Search in sources :

Example 1 with PortRepositoryObject

use of org.talend.repository.services.utils.PortRepositoryObject in project tesb-studio-se by Talend.

the class CreateNewJobAction method repositoryChange.

private void repositoryChange(RepositoryNode nodeOperation, Node nodeProviderRequest) {
    IElementParameter param = nodeProviderRequest.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);
    if (param != null) {
        param.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).setValue(EmfComponent.REPOSITORY);
        ConnectionItem connectionItem = (ConnectionItem) nodeOperation.getObject().getProperty().getItem();
        String serviceId = connectionItem.getProperty().getId();
        String portId = ((PortRepositoryObject) nodeOperation.getParent().getObject()).getId();
        String operationId = ((OperationRepositoryObject) nodeOperation.getObject()).getId();
        ChangeValuesFromRepository command2 = new ChangeValuesFromRepository(nodeProviderRequest, connectionItem.getConnection(), param.getName() + ':' + EParameterName.REPOSITORY_PROPERTY_TYPE.getName(), //$NON-NLS-1$
        serviceId + " - " + portId + " - " + operationId);
        command2.execute();
    }
}
Also used : ChangeValuesFromRepository(org.talend.designer.core.ui.editor.cmd.ChangeValuesFromRepository) ConnectionItem(org.talend.core.model.properties.ConnectionItem) IElementParameter(org.talend.core.model.process.IElementParameter) PortRepositoryObject(org.talend.repository.services.utils.PortRepositoryObject) OperationRepositoryObject(org.talend.repository.services.utils.OperationRepositoryObject)

Example 2 with PortRepositoryObject

use of org.talend.repository.services.utils.PortRepositoryObject in project tesb-studio-se by Talend.

the class ESBService method repositoryChange.

private void repositoryChange(RepositoryNode repNode, INode node, IProcess2 process) {
    IElementParameter param = node.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);
    ConnectionItem connectionItem = (ConnectionItem) repNode.getObject().getProperty().getItem();
    if (param != null) {
        param.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).setValue(EmfComponent.REPOSITORY);
        param.getChildParameters().get(EParameterName.REPOSITORY_PROPERTY_TYPE.getName()).setValue("");
        connectionItem.getProperty().getId();
        ((PortRepositoryObject) repNode.getParent().getObject()).getId();
        ((OperationRepositoryObject) repNode.getObject()).getId();
        ChangeValuesFromRepository command2 = new ChangeValuesFromRepository(node, null, param.getName() + ":" + EParameterName.PROPERTY_TYPE.getName(), //$NON-NLS-1$
        "BUILT_IN");
        IEditorPart editor = process.getEditor();
        if (editor == null) {
            command2.execute();
        } else {
            ((AbstractMultiPageTalendEditor) editor).getTalendEditor().getCommandStack().execute(command2);
        }
    }
}
Also used : ChangeValuesFromRepository(org.talend.designer.core.ui.editor.cmd.ChangeValuesFromRepository) ConnectionItem(org.talend.core.model.properties.ConnectionItem) AbstractMultiPageTalendEditor(org.talend.designer.core.ui.AbstractMultiPageTalendEditor) IElementParameter(org.talend.core.model.process.IElementParameter) PortRepositoryObject(org.talend.repository.services.utils.PortRepositoryObject) IEditorPart(org.eclipse.ui.IEditorPart) OperationRepositoryObject(org.talend.repository.services.utils.OperationRepositoryObject)

Example 3 with PortRepositoryObject

use of org.talend.repository.services.utils.PortRepositoryObject in project tesb-studio-se by Talend.

the class AssignJobAction method repositoryChange.

private void repositoryChange(RepositoryNode repNode, INode node) {
    IElementParameter param = node.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);
    ConnectionItem connectionItem = (ConnectionItem) repNode.getObject().getProperty().getItem();
    if (param != null) {
        param.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).setValue(EmfComponent.REPOSITORY);
        String serviceId = connectionItem.getProperty().getId();
        String portId = ((PortRepositoryObject) repNode.getParent().getObject()).getId();
        String operationId = ((OperationRepositoryObject) repNode.getObject()).getId();
        ChangeValuesFromRepository command2 = new ChangeValuesFromRepository(node, connectionItem.getConnection(), param.getName() + ":" + EParameterName.REPOSITORY_PROPERTY_TYPE.getName(), //$NON-NLS-1$
        serviceId + " - " + portId + " - " + operationId);
        command2.execute();
    }
}
Also used : ChangeValuesFromRepository(org.talend.designer.core.ui.editor.cmd.ChangeValuesFromRepository) ConnectionItem(org.talend.core.model.properties.ConnectionItem) IElementParameter(org.talend.core.model.process.IElementParameter) PortRepositoryObject(org.talend.repository.services.utils.PortRepositoryObject) OperationRepositoryObject(org.talend.repository.services.utils.OperationRepositoryObject)

Aggregations

IElementParameter (org.talend.core.model.process.IElementParameter)3 ConnectionItem (org.talend.core.model.properties.ConnectionItem)3 ChangeValuesFromRepository (org.talend.designer.core.ui.editor.cmd.ChangeValuesFromRepository)3 OperationRepositoryObject (org.talend.repository.services.utils.OperationRepositoryObject)3 PortRepositoryObject (org.talend.repository.services.utils.PortRepositoryObject)3 IEditorPart (org.eclipse.ui.IEditorPart)1 AbstractMultiPageTalendEditor (org.talend.designer.core.ui.AbstractMultiPageTalendEditor)1