Search in sources :

Example 6 with ComponentWizard

use of org.talend.components.api.wizard.ComponentWizard in project tdi-studio-se by Talend.

the class GenericDragAndDropHandler method getComponentMainName.

private String getComponentMainName(GenericConnection connection) {
    IGenericWizardInternalService internalService = new GenericWizardInternalService();
    ComponentWizard componentWizard = null;
    String compPropertiesStr = connection.getCompProperties();
    if (compPropertiesStr != null) {
        ComponentProperties properties = ComponentsUtils.getComponentPropertiesFromSerialized(compPropertiesStr, connection);
        if (properties != null) {
            componentWizard = internalService.getTopLevelComponentWizard(properties, null);
        }
    }
    if (componentWizard != null) {
        return StringUtils.capitalize(componentWizard.getDefinition().getName());
    }
    return null;
}
Also used : ComponentWizard(org.talend.components.api.wizard.ComponentWizard) ComponentProperties(org.talend.components.api.properties.ComponentProperties) IGenericWizardInternalService(org.talend.repository.generic.internal.IGenericWizardInternalService) GenericWizardInternalService(org.talend.repository.generic.internal.service.GenericWizardInternalService) IGenericWizardInternalService(org.talend.repository.generic.internal.IGenericWizardInternalService)

Aggregations

ComponentProperties (org.talend.components.api.properties.ComponentProperties)6 ComponentWizard (org.talend.components.api.wizard.ComponentWizard)6 ComponentService (org.talend.components.api.service.ComponentService)4 GenericConnectionItem (org.talend.repository.generic.model.genericMetadata.GenericConnectionItem)4 GenericConnection (org.talend.repository.generic.model.genericMetadata.GenericConnection)3 IOException (java.io.IOException)2 Properties (java.util.Properties)2 Path (org.eclipse.core.runtime.Path)2 Connection (org.talend.core.model.metadata.builder.connection.Connection)2 ConnectionItem (org.talend.core.model.properties.ConnectionItem)2 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)2 ProxyRepositoryFactory (org.talend.core.repository.model.ProxyRepositoryFactory)2 NamedThing (org.talend.daikon.NamedThing)2 IGenericWizardInternalService (org.talend.repository.generic.internal.IGenericWizardInternalService)2 GenericWizardInternalService (org.talend.repository.generic.internal.service.GenericWizardInternalService)2 HashSet (java.util.HashSet)1 Image (org.eclipse.swt.graphics.Image)1 ComponentWizardDefinition (org.talend.components.api.wizard.ComponentWizardDefinition)1 MetadataTable (org.talend.core.model.metadata.builder.connection.MetadataTable)1 SalesforceSchemaConnection (org.talend.core.model.metadata.builder.connection.SalesforceSchemaConnection)1