Compare commits
7 Commits
patch/5.3.
...
release/5.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce666c6f9d | ||
|
|
d2f7e669ad | ||
|
|
43f38006e0 | ||
|
|
0e40a73723 | ||
|
|
bac612148b | ||
|
|
91e7399503 | ||
|
|
bea92e8be5 |
@@ -46,6 +46,7 @@ ComponentProjectPreferencePage.Warning=Warnung
|
||||
AbstractXMLConfigPage.VERSIONTip=Ein Dezimalwert zur Angabe der Version Ihrer neuen Komponente.
|
||||
WizardJetFilesChoosePage.Directory=Verzeichnis:
|
||||
CreateComponentWizard.NewComponent=Neue Komponente
|
||||
WizardComponentFolderPage.Name=Name
|
||||
RemoveResourceAction.Remove=Entfernen
|
||||
WizardJetFilesChoosePage.UseIconFrom=Verwende Icon von:
|
||||
ImportComponentDialog.ImportFinished=Import der Komponente abgeschlossen
|
||||
|
||||
@@ -19,21 +19,16 @@ WizardComponentFolderPage.ErrMSG1=Nije ozna\u010Den jezik za komponentu
|
||||
CreateComponentWizard.FillIn=Popuni svojstva komponente
|
||||
ComponentProjectPreferencePage.Warning=Upozorenje
|
||||
AbstractXMLConfigPage.VERSIONTip=Decimalna vrijednost koja ozna\u010Dava verziju va\u0161e nove komponente.
|
||||
WizardJetFilesChoosePage.Directory=Direktorij:
|
||||
WizardComponentFolderPage.Name=Ime
|
||||
RemoveResourceAction.Remove=Ukloni
|
||||
WizardJetFilesChoosePage.UseIconFrom=Koristi ikonu iz:
|
||||
AbstractXMLConfigPage.SetProperties=Postavi svojstva odabranog elementa.
|
||||
AddResourceAction.AddLib=Dodaj biblioteke...
|
||||
WizardComponentFolderPage.Perl=Perl
|
||||
AbstractXMLConfigPage.NBLINESTip=Cjelobrojna vrijednost. Linije se prote\u017Eu od tog parametra unutar Component pogleda.
|
||||
AbstractXMLConfigPage.MININPUTTip=Integer vrijednost. Najmanji broj ulaza za ovu vezu.
|
||||
WizardJetFilesChoosePage.UseDefaultIcon=Koristi zadanu ikonu
|
||||
WizardComponentFolderPage.LongName=Duga\u010Dko ime (mouseover tooltip)
|
||||
CopyComponentActionProvider.CopyComponent=Kopiraj tu komponentu
|
||||
AddExternalResourceAction.ErrorMsg=Ozna\u010Dena vanjska arhiva nije dostupna ili ne postoji.
|
||||
CopyFromPaletteActionProvider.Label=Kopiraj komponentu iz izbornika Palette
|
||||
WizardJetFilesChoosePage.ChoseAIcon=Odaberi ikonu
|
||||
AbstractXMLConfigPage.LINESTYLETip=Cjelobrojna vrijednost'. Stil spojne linije (1. Puna, 2: Crtkana, 3: To\u010Dka, 4: Crta-To\u010Dka)
|
||||
ComponentProjectPreferencePage.ButtonLabel0=U redu
|
||||
CreateComponentWizard.MainProperties=Glavna svojstva
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
AbstractXMLConfigPage.BooleanTip=Boolean value (true or false).
|
||||
AbstractXMLConfigPage.COLORTip=Hex value of RGB. For example\: "00FF00"
|
||||
AbstractXMLConfigPage.CTYPETip=Connector type.
|
||||
AbstractXMLConfigPage.Delete=Delete
|
||||
AbstractXMLConfigPage.EXTENSIONTip=String value of plugin name. This option is for external componet.
|
||||
AbstractXMLConfigPage.IntValue=Integer value.
|
||||
AbstractXMLConfigPage.LINESTYLETip=Integer value. Line style of the connetion. (1\: Solid Line, 2\: Dash Line, 3\: Dot Line, 4\: Dashdot Line)
|
||||
AbstractXMLConfigPage.MAXINPUTTip=Integer value. Maximum input connection for this connection
|
||||
AbstractXMLConfigPage.MAXOUTPUTTip=Integer value. Maximum output connection for this connection
|
||||
AbstractXMLConfigPage.MININPUTTip=Integer value. Minimum input connection for this connection
|
||||
AbstractXMLConfigPage.MINOUTPUTTip=Integer value. Minimum output connection for this connection
|
||||
AbstractXMLConfigPage.NBLINESTip=Integer value. Lines spans of this parameter in the component's properties view
|
||||
AbstractXMLConfigPage.NUMROWTip=Integer value. Row position of this parameter in the component's properties view
|
||||
AbstractXMLConfigPage.New=New
|
||||
AbstractXMLConfigPage.REPOSITORYVALUETip=Metadata repository to select.
|
||||
AbstractXMLConfigPage.SetProperties=Set the properties for selected element.
|
||||
AbstractXMLConfigPage.TYPETip=Data type.
|
||||
AbstractXMLConfigPage.VERSIONTip=A decimal value to indicate the version of your new component.
|
||||
AddExternalResourceAction.AddELibs=Add External Libraries...
|
||||
AddExternalResourceAction.ErrorMsg=The selected external archive is unavailable or does not exist.
|
||||
AddExternalResourceAction.ErrorTitle=External Archive Error
|
||||
AddExternalResourceAction.JarSelection=Jar Selection
|
||||
AddResourceAction.AddLib=Add Libraries...
|
||||
AddResourceAction.ChooseResource=&Choose jars and zips to add\:
|
||||
AddResourceAction.JARSecection=JAR Selection
|
||||
ComponentProjectManager.CreationProblems=Creation Problems
|
||||
ComponentProjectManager.InternalErrorMsg=Internal error\: {0}
|
||||
ComponentProjectManager.NewProject=New Component Project
|
||||
ComponentProjectManager.WarningMsg=The underlying file system is case insensitive. There is an existing project which conflicts with {0}
|
||||
ComponentProjectPreferencePage.ButtonLabel0=Ok
|
||||
ComponentProjectPreferencePage.ChooseProject=Choose a project folder for this component designer
|
||||
ComponentProjectPreferencePage.ComponentProject=Component Project\:
|
||||
ComponentProjectPreferencePage.SelectPath=Select Component Project Path
|
||||
ComponentProjectPreferencePage.Warning=Warning
|
||||
ComponentProjectPreferencePage.WarningMSG=Warning, this modification will only impact Component Designer, not the Palette.
|
||||
CopyComponentActionProvider.CopyComponent=Copy This Component
|
||||
CopyComponentActionProvider.CopyComponent2=Copy Component
|
||||
CopyComponentActionProvider.InputName=Input a new component name for
|
||||
CopyComponentValidator.ComponentExist=The component has been exsit
|
||||
CopyFromPaletteActionProvider.Label=Copy Components from Palette
|
||||
CopyFromPaletteActionProvider.Label2=Import components from palette
|
||||
CreateComponentWizard.CreateXMLJava=Create the XML configuration file for JAVA Component
|
||||
CreateComponentWizard.CreateXMLPerl=Create the XML configuration file for PERL Component
|
||||
CreateComponentWizard.FillIn=Fill in component properties
|
||||
CreateComponentWizard.MainProperties=Main Properties
|
||||
CreateComponentWizard.NewComponent=New Component
|
||||
CreateComponentWizard.SpecifyRes=Specify resources
|
||||
EditComponentActionProvider.Edit=Edit This Component
|
||||
EditComponentActionProvider.GroupEdit=group.edit
|
||||
FileCopy.ExceptionMSG=The source File "
|
||||
ImportComponentDialog.Browser=Browser..
|
||||
ImportComponentDialog.ChooseComponentsLabel=Choose components to import\:
|
||||
ImportComponentDialog.ErrorMSG4=No component was selected for importing.
|
||||
ImportComponentDialog.Filter=Filter\:
|
||||
ImportComponentDialog.ImportCanceled=Import Components Canceled
|
||||
ImportComponentDialog.ImportCanceledMSG=Task import components from palette was canceled.
|
||||
ImportComponentDialog.ImportFinished=Import Components Finished
|
||||
ImportComponentDialog.ImportFinishedMSG=Components imported successfully.
|
||||
ImportComponentDialog.NoComponentsAvailable=No Components available.
|
||||
ImportComponentDialog.SelectDirectoryLabel=Select a directory\:
|
||||
ImportComponentDialog.ShowPaletteComponents=Show Palette Components
|
||||
ImportComponentDialog.WarningMSG=This operation will overwrite the existing components in workspace. Do you really want to import the selected components?
|
||||
ImportComponentDialog.WarningTitle=Warning
|
||||
NewActionProvider.New=New
|
||||
NewActionProvider.NewComponent=New Component
|
||||
PluginConstant.Borwser=Browser..
|
||||
ProjectSelectionDialog.ChooseFolder=Choose a project folder for this session
|
||||
ProjectSelectionDialog.ComponentProject=Component Project\:
|
||||
ProjectSelectionDialog.SelectPath=Select Project Path
|
||||
PushToPaletteActionProvider.Error=Error
|
||||
PushToPaletteActionProvider.Error2=Error
|
||||
PushToPaletteActionProvider.ErrorMSG=User component folder is not set.
|
||||
PushToPaletteActionProvider.ErrorMSG2=User component folder doesn't exist.
|
||||
PushToPaletteActionProvider.Information=Informaton
|
||||
PushToPaletteActionProvider.InformationMSG=Components have been published. The palette is going to be refreshed.
|
||||
PushToPaletteActionProvider.OK=OK
|
||||
PushToPaletteActionProvider.OK2=OK
|
||||
PushToPaletteActionProvider.OK3=OK
|
||||
PushToPaletteActionProvider.PushComponentsToPalette=Push Components to Palette
|
||||
PushToPaletteActionProvider.PushToPaletteActionProvider.failed=Push components to palette failed for these invalid XML files.\n
|
||||
PushToPaletteActionProvider.PushToPaletteActionProvider.result=Validation result
|
||||
RemoveResourceAction.Remove=Remove
|
||||
ValidateComponentXMLActionProvider.error=\n\tThere is an Error on line {0}
|
||||
ValidateComponentXMLActionProvider.fatalerror=\n\tThere is a Fatal Error on line {0}
|
||||
ValidateComponentXMLActionProvider.invalid=Invalid component XML file\:\n
|
||||
ValidateComponentXMLActionProvider.ok=OK
|
||||
ValidateComponentXMLActionProvider.result=Validation result
|
||||
ValidateComponentXMLActionProvider.valid=Component XML file is valid\!
|
||||
ValidateComponentXMLActionProvider.validate=Validate Component XML
|
||||
ValidateComponentXMLActionProvider.warning=\n\tThere is a Warning on line {0}
|
||||
WizardComponentFolderPage.Available=Available in
|
||||
WizardComponentFolderPage.ErrMSG1=The component language have not been selected
|
||||
WizardComponentFolderPage.ErrMSG2=The component Name is empty
|
||||
WizardComponentFolderPage.ErrMSG3=This component already exists
|
||||
WizardComponentFolderPage.ErrMSG4=The component Long Name is empty
|
||||
WizardComponentFolderPage.ErrMSG5=The component Family is empty
|
||||
WizardComponentFolderPage.Family=Family
|
||||
WizardComponentFolderPage.Java=Java
|
||||
WizardComponentFolderPage.LongName=Long Name (mouseover tooltip)
|
||||
WizardComponentFolderPage.Name=Name
|
||||
WizardComponentFolderPage.Perl=Perl
|
||||
WizardJetFilesChoosePage.BeginFile=Begin File
|
||||
WizardJetFilesChoosePage.ChoseAIcon=Chose an icon
|
||||
WizardJetFilesChoosePage.Directory=Directory\:
|
||||
WizardJetFilesChoosePage.EndFile=End File
|
||||
WizardJetFilesChoosePage.MainFile=Main File
|
||||
WizardJetFilesChoosePage.UseDefaultIcon=Use default icon
|
||||
WizardJetFilesChoosePage.UseIconFrom=Use icon from\:
|
||||
@@ -1,6 +0,0 @@
|
||||
ApplicationActionBarAdvisor.fileMenu=&File
|
||||
ApplicationActionBarAdvisor.helpMenu=&Help
|
||||
ApplicationActionBarAdvisor.windowMenu=&Window
|
||||
ApplicationWorkbenchWindowAdvisor.rcpApp=RCP Application
|
||||
FileWizard.0=File Wizard
|
||||
ShowViewAction.actionLabel=Show view...
|
||||
@@ -1341,12 +1341,16 @@
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.libraries.csv"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
<plugin
|
||||
id="org.talend.libraries.jdbc.sybase"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.librariesmanager"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
prefs.configuration.title=Map components preferences :
|
||||
prefs.configuration.LINK_STYLE=Default mapping links display as :
|
||||
prefs.configuration.LINK_STYLE.AUTO=Auto
|
||||
prefs.configuration.LINK_STYLE.BEZIER_CURVE=Curves
|
||||
prefs.configuration.LINK_STYLE.LINE=Lines (fast)
|
||||
DraggingInfosPopup.draggingEntry=Dragging {0} entry.
|
||||
DraggingInfosPopup.dropInvalid=\n<< Drop invalid >>\n
|
||||
DraggingInfosPopup.draggingEntries=Dragging {0} entries.
|
||||
DraggingInfosPopup.dropInvalidWithKey=\n<< Drop invalid >>\nPress both Shift and Ctrl keys to map one to one and overwrite
|
||||
DraggingInfosPopup.overwriteMode=\ > Overwrite mode
|
||||
DraggingInfosPopup.appendMode=\ > Append mode
|
||||
DraggingInfosPopup.appendModeToOverwrite=\ > Append mode (Ctrl key to overwrite)
|
||||
DraggingInfosPopup.insertAllSelectedEntries=\ > Insert all selected entries
|
||||
DraggingInfosPopup.insertRemainingEntries=\ > Insert remaining entries
|
||||
DraggingInfosPopup.eachSourceEntryExpressionToEachTargetExpression= > Each source entry expression to each target expression
|
||||
DraggingInfosPopup.eachSourceEntryToEachTargetExpression= > Each source entry to each target expression
|
||||
DraggingInfosPopup.allSourceEntriesExpressionToASingleOneTargetExpressionShiftKey= > All source entries expression to a single one target expression (Shift key to change mapping)
|
||||
DraggingInfosPopup.allSourceEntriesExpressionToASingleOneTargetExpression= > All source entries expression to a single one target expression
|
||||
DraggingInfosPopup.allSourceEntriesToASingleOneTargetExpressionShiftKey= > All source entries to a single one target expression (Shift key to change mapping)
|
||||
DraggingInfosPopup.allSourceEntriesToASingleOneTargetExpression= > All source entries to a single one target expression
|
||||
@@ -26,16 +26,16 @@ import org.apache.oro.text.regex.Substitution;
|
||||
import org.apache.oro.text.regex.Util;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.core.model.context.UpdateContextVariablesHelper;
|
||||
import org.talend.core.model.process.AbstractExternalNode;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.core.model.process.node.IExternalMapEntry;
|
||||
import org.talend.core.model.process.node.MapperExternalNode;
|
||||
import org.talend.designer.abstractmap.ui.prefs.MapPrefsConstants;
|
||||
|
||||
/**
|
||||
* DOC amaumont class global comment. Detailled comment <br/>
|
||||
*
|
||||
*/
|
||||
public abstract class AbstractMapComponent extends MapperExternalNode {
|
||||
public abstract class AbstractMapComponent extends AbstractExternalNode {
|
||||
|
||||
/**
|
||||
* DOC amaumont AbstractMapComponent constructor comment.
|
||||
|
||||
@@ -14,4 +14,5 @@ AlfrescoOutputModelManager.prefixConflict=Kann das Modell nicht hinzuf
|
||||
AlfrescoOutputModelManager.notYetAdded=Dieses Modell wurde noch nicht hinzugefügt.
|
||||
AlfrescoModelDialog.type=Typ
|
||||
AlfrescoModelDialog.addModelFailed=Modell hinzufügen fehlgeschlagen
|
||||
AlfrescoModelDialog.modelTable.name=Name
|
||||
AlfrescoModelDialog.remove=Entfernen
|
||||
|
||||
@@ -10,5 +10,4 @@ AlfrescoOutputModelManager.prefixConflict=Ne mogu dodati model, prefix je u konf
|
||||
AlfrescoOutputModelManager.notYetAdded=Taj model jo\u0161 nije dodan
|
||||
AlfrescoModelDialog.addModelFailed=Dodavanje modela nije uspjelo
|
||||
AlfrescoModelDialog.modelTable.name=Ime
|
||||
AlfrescoModelDialog.remove=Ukloni
|
||||
AlfrescoOutputManager.failedLoadModel=U\u010Ditavanje modela iz metapodataka komponente nije uspjelo, reinicijaliziram
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
AlfrescoOutputManager.failedLoadModel=Failed to load model from component metadata, reinitializing
|
||||
AlfrescoOutputManager.schemaError.title=Error in schema
|
||||
AlfrescoOutputManager.schemaError.msg=Please synchronize schema first
|
||||
AlfrescoOutputModelManager.alreadyAdded=This model has already been added
|
||||
AlfrescoOutputModelManager.errorReadingModel=Error reading Alfresco model file
|
||||
AlfrescoOutputModelManager.notYetAdded=This model has not yet been added
|
||||
AlfrescoOutputModelManager.prefixConflict=Unable to add the model, prefix conflict with previously added model for
|
||||
AlfrescoModelDialog.type=Type
|
||||
AlfrescoModelDialog.aspects=Aspects
|
||||
AlfrescoModelDialog.availableAspects=Available Aspects
|
||||
AlfrescoModelDialog.add=Add...
|
||||
AlfrescoModelDialog.addModelFailed=Failed to add model
|
||||
AlfrescoModelDialog.remove=Remove
|
||||
AlfrescoModelDialog.removeModelFailed=Failed to remove model
|
||||
AlfrescoModelDialog.missingTypeDefinitions.title=Missing type definitions
|
||||
AlfrescoModelDialog.missingTypeDefinitions.msg=The chosen type refers to unknown Alfresco type(s) or aspect(s) : ${0}.\n\
|
||||
Please provide the alfresco model files that define them.
|
||||
AlfrescoModelDialog.missingAspectDefinitions.title=Missing aspects definitions
|
||||
AlfrescoModelDialog.missingAspectDefinitions.msg=The chosen aspects refer to unknown Alfresco aspect(s) : ${0}.\nPlease provide the alfresco model files that define them.
|
||||
AlfrescoModelDialog.modelTable.title=Title
|
||||
AlfrescoModelDialog.modelTable.name=Name
|
||||
@@ -1,4 +1,3 @@
|
||||
AlfrescoModelDialog.modelTable.title=Ba\u015Fl\u0131k
|
||||
AlfrescoModelDialog.add=Ekle...
|
||||
AlfrescoModelDialog.type=Tip
|
||||
AlfrescoModelDialog.modelTable.name=Ad\u0131
|
||||
|
||||
@@ -6,8 +6,4 @@ bin.includes = META-INF/,\
|
||||
plugin_en.properties,\
|
||||
plugin_fr.properties,\
|
||||
plugin_it.properties,\
|
||||
plugin_zh_CN.properties\
|
||||
,plugin_ru.properties\
|
||||
,plugin_el.properties\
|
||||
,plugin_ja.properties\
|
||||
,plugin_swtbot.properties
|
||||
plugin_zh.properties
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
providerName=.Talend SA.
|
||||
pluginName=\u0395\u03C0\u03B9\u03C7\u03B5\u03B9\u03C1\u03B7\u03C3\u03B9\u03B1\u03BA\u03CC \u03A0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C4\u03BF
|
||||
repository.businessProcess=\u0395\u03C0\u03B9\u03C7\u03B5\u03B9\u03C1\u03B7\u03BC\u03B1\u03C4\u03B9\u03BA\u03AC \u039C\u03BF\u03BD\u03C4\u03AD\u03BB\u03B1
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
pluginName=Business Plugin
|
||||
providerName=.Talend SA.
|
||||
repository.businessProcess=Business Models
|
||||
@@ -53,4 +53,3 @@ BusinessNewDiagramFileWizard.SelectDiagramRootElement=\u0627\u062E\u062A\u0631 \
|
||||
BusinessAbstractParser.StringFloatConvertError=\u0644\u0627 \u064A\u0645\u0643\u0646 \u062A\u062D\u0648\u064A\u0644 \u0642\u064A\u0645\u0629 \u0646\u0635\u064A\u0629 \u0625\u0644\u0649 \u0642\u064A\u0645\u0629 \u0639\u0634\u0631\u064A\u0629
|
||||
BusinessAbstractParser.StringValueDoesNotConvertToByteValue=\u0644\u0627 \u064A\u0645\u0643\u0646 \u062A\u062D\u0648\u064A\u0644 \u0642\u064A\u0645\u0629 \u0646\u0635\u064A\u0629 \u0625\u0644\u0649 \u0642\u064A\u0645\u0629 \u0628\u0627\u064A\u062A
|
||||
DeleteAssignmentAction.DeleteAssignment=\u062D\u0630\u0641 \u062A\u0643\u0644\u064A\u0641
|
||||
BusinessDiagramEditor.canNotSaveTitle=\u062A\u062D\u0630\u064A\u0631
|
||||
|
||||
@@ -16,6 +16,7 @@ BusinessModelingAssistantProvider.AvaiableDomainModelElements=Verf
|
||||
BusinessPaletteFactory.BidirectionalRelationShip=Bidirektionale Beziehung
|
||||
BusinessPaletteFactory.CreateDirectionalRelationShip=Direktionale Beziehung hinzufügen
|
||||
BusinessPaletteFactory.CreateBidirectionalRelationShip=Bidirektionale Beziehung hinzufügen
|
||||
AssignmentPropertySection.Name=Name
|
||||
CreateAssignmentCommand.CannotAssign=Zuordnung nicht möglich.
|
||||
BusinessNewDiagramFileWizard.DiagramRootElement=Diagramm root-Element
|
||||
BusinessNewDiagramFileWizard.NoDiagramRootElementSelectedError=Kein Diagram-Root Element ausgewählt
|
||||
|
||||
@@ -75,4 +75,3 @@ BusinessAbstractParser.StringValueDoesNotConvertToByteValue=\u03A4\u03B9\u03BC\u
|
||||
BusinessNewDiagramFileWizard.IntialNewEcoreDiagramFile=\u0391\u03C1\u03C7\u03B9\u03BA\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03BD\u03AD\u03BF\u03C5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03B4\u03B9\u03B1\u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03BF\u03C2 Ecore
|
||||
BusinessTooltipFigure.assignedMeta={0} \u03BA\u03B1\u03B8\u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03B1 \u039C\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03B1
|
||||
DeleteAssignmentAction.DeleteAssignment=\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u0391\u03BD\u03AC\u03B8\u03B5\u03C3\u03B7\u03C2
|
||||
BusinessDiagramEditor.canNotSaveTitle=\u03A0\u03C1\u03BF\u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7
|
||||
|
||||
@@ -64,4 +64,3 @@ BusinessAbstractParser.StringFloatConvertError=String nije mogu\u0107e konvertir
|
||||
BusinessAbstractParser.StringValueDoesNotConvertToByteValue=String nije mogu\u0107e konvertirati u Byte
|
||||
BusinessNewDiagramFileWizard.IntialNewEcoreDiagramFile=Inicijaliziranje nove datoteke za Ecore dijagram
|
||||
DeleteAssignmentAction.DeleteAssignment=Izbri\u0161i pridru\u017Eivanje
|
||||
BusinessDiagramEditor.canNotSaveTitle=Upozorenje
|
||||
|
||||
@@ -80,4 +80,3 @@ BusinessNewDiagramFileWizard.IntialNewEcoreDiagramFile=\u65B0\u898F Ecore \u30C0
|
||||
BusinessTooltipFigure.assignedMeta=\u5272\u308A\u5F53\u3066\u3089\u308C\u305F\u30E1\u30BF\u30C7\u30FC\u30BF {0}
|
||||
DeleteAssignmentAction.DeleteAssignment=\u5272\u308A\u5F53\u3066\u306E\u524A\u9664
|
||||
BusinessDiagramEditor.canNotSaveTitle=\u8B66\u544A
|
||||
BusinessDiagramEditor.canNotSaveMessage=\u4ED6\u306E\u30E6\u30FC\u30B6\u304C\u64CD\u4F5C\u4E2D\u306E\u305F\u3081\u3001\u30D3\u30B8\u30CD\u30B9\u30E2\u30C7\u30EB\u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
|
||||
@@ -57,4 +57,3 @@ BusinessAbstractParser.StringFloatConvertError=Warto\u015B\u0107 typu znakowego
|
||||
BusinessAbstractParser.StringValueDoesNotConvertToByteValue=Warto\u015B\u0107 typu znakowego nie mo\u017Ce by\u0107 skonwertowana na warto\u015B\u0107 typu Byte
|
||||
BusinessNewDiagramFileWizard.IntialNewEcoreDiagramFile=Inicjalizuj nowy plik diagramu Ecore
|
||||
DeleteAssignmentAction.DeleteAssignment=Skasuj przypisanie
|
||||
BusinessDiagramEditor.canNotSaveTitle=Ostrze\u017Cenie
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
CreateDiagramAction.CreateBusinessModel=Create Business Model
|
||||
CreateAssignmentCommand.CannotAssign=Cannot Assign.
|
||||
FindAssignmentAction.FindAssignments=Find Assignments
|
||||
EditAction.Edit=Edit
|
||||
SimpleBusinessCreationWizardPage.Super=BusinessProcessCreatePage
|
||||
SimpleBusinessCreationWizardPage.Title=New Business Model
|
||||
SimpleBusinessCreationWizard.NewBusinessModel=New Business Model
|
||||
OpenDiagramAction.EditBusinessModel=Edit Business Model
|
||||
OpenDiagramAction.ReadBusinessModel=Read Business Model
|
||||
DeleteAssignmentAction.DeleteAssignment =Delete Assignment
|
||||
AssignmentPropertySection.Type=Type
|
||||
AssignmentPropertySection.Name=Name
|
||||
AssignmentPropertySection.Comment=Comment
|
||||
AssignmentPropertySection.DeleteAssignment=Delete Assignment
|
||||
BusinessPaletteFactory.DecisionComment=Create new Decision
|
||||
BusinessPaletteFactory.TerminalComment=Create new Terminal
|
||||
BusinessPaletteFactory.DocuemntComment=Create new Document
|
||||
BusinessPaletteFactory.DatabaseComment=Create new Database
|
||||
BusinessInitDiagramFileAction.Error=Error
|
||||
BusinessVisualIDRegistry.ParseError=Unable to parse view type as a visualID number:
|
||||
BusinessPaletteFactory.decision=Decision
|
||||
BusinessPaletteFactory.Action=Action
|
||||
BusinessPaletteFactory.Actor=Actor
|
||||
BusinessPaletteFactory.ActionComment=Create new Action
|
||||
BusinessPaletteFactory.CreateEllipse=Create new Ellipse
|
||||
BusinessAbstractParser.InvalidInputAt=Invalid input at
|
||||
BusinessAbstractParser.UnknownLiteral=Unknown literal:
|
||||
BusinessPaletteFactory.Terminal=Terminal
|
||||
BusinessPaletteFactory.DataComment=Create new Data
|
||||
BusinessPaletteFactory.Document=Document
|
||||
BusinessPaletteFactory.InputComment=Create new Input
|
||||
BusinessPaletteFactory.ListComment=Create new List
|
||||
BusinessPaletteFactory.CreateActor=Create new Actor
|
||||
BusinessPaletteFactory.CreateGear=Create new Gear
|
||||
BusinessPaletteFactory.Database=Database
|
||||
BusinessPaletteFactory.Ellipse=Ellipse
|
||||
BusinessPaletteFactory.Relationshop=Relationship
|
||||
BusinessInitDiagramFileAction.LoadFaild=Model file loading failed
|
||||
BusinessInitDiagramFileAction.IntialNew=Initialize new
|
||||
BusinessInitDiagramFileAction.DiagramFile=\ diagram file
|
||||
BusinessPaletteFactory.RelationshopComment=Create new Relationship
|
||||
BusinessPaletteFactory.DirectionalRelationShip=Directional Relationship
|
||||
BusinessPaletteFactory.CreateDirectionalRelationShip=Create new Directional Relationship
|
||||
BusinessPaletteFactory.BidirectionalRelationShip=Bidirectional Relationship
|
||||
BusinessPaletteFactory.CreateBidirectionalRelationShip=Create new Bidirectional Relationship
|
||||
BusinessNewDiagramFileWizard.DiagramFile=Diagram file
|
||||
BusinessInitDiagramFileAction.UnableToLoadResource=Unable to load resource:
|
||||
BusinessAbstractParser.ValueOfTypeStringIsExpected=Value of type String is expected
|
||||
BusinessCreationWizardPage.CreateBusinessDiagram=Create Business Diagram
|
||||
BusinessAbstractParser.ValueOfTypeByteIsExpected=Value of type Byte is expected
|
||||
BusinessAbstractParser.StringIntegerConvertError=String value does not convert to Integer value
|
||||
BusinessNewDiagramFileWizard.CreateNewDiagram=Create new diagram based on {0} model content
|
||||
BusinessAbstractParser.StringShortConverError=String value does not convert to Short value
|
||||
BusinessAbstractParser.ValueOfShortIsExpected=Value of type Short is expected
|
||||
BusinessAbstractParser.StringLongConverError=String value does not convert to Long value
|
||||
BusinessAbstractParser.ValueOfLongIsExpected=Value of type Long is expected
|
||||
BusinessAbstractParser.ValueOfFloatIsExpected=Value of type Float is expected
|
||||
BusinessNewDiagramFileWizard.SelectRootElement=Select diagram root element
|
||||
BusinessAbstractParser.StringFloatConvertError=String value does not convert to Float value
|
||||
BusinessAbstractParser.ValueOfDoubleIsExpected=Value of type Double is expected
|
||||
BusinessNewDiagramFileWizard.DiagramRootElement=Diagram root element
|
||||
BusinessAbstractParser.ValueOfBooleanIsExpected=Value of type Boolean is expected
|
||||
BusinessAbstractParser.ValueOfIntegerIsExpected=Value of type Integer is expected
|
||||
BusinessAbstractParser.StringDoubleConvertError=String value does not convert to Double value
|
||||
BusinessCreationWizardPage.CreatenewBusinessDiagram=Create a new Business diagram.
|
||||
BusinessNewDiagramFileWizard.IntialNewEcoreDiagramFile=Initialize new Ecore diagram file
|
||||
BusinessNewDiagramFileWizard.SelectSemanticModelElement=Select semantic model element to be depicted on diagram
|
||||
BusinessNewDiagramFileWizard.SelectDiagramRootElement=Select diagram root element:
|
||||
BusinessAbstractParser.ValueOfTypeCharacterIsExpected=Value of type Character is expected
|
||||
BusinessNewDiagramFileWizard.NoDiagramRootElementSelectedError=No diagram root element selected
|
||||
BusinessNewDiagramFileWizard.InvalidDiagramRootElementSelected=Invalid diagram root element was selected
|
||||
BusinessModelingAssistantProvider.AvaiableDomainModelElements=Available domain model elements:
|
||||
BusinessAbstractParser.StringValueDoesNotConvertToByteValue=String value does not convert to Byte value
|
||||
BusinessModelingAssistantProvider.SelectDomainModelElement=Select domain model element
|
||||
BusinessPaletteFactory.Data=Data
|
||||
BusinessPaletteFactory.Input=Input
|
||||
BusinessPaletteFactory.List=List
|
||||
BusinessPaletteFactory.Gear=Gear
|
||||
BusinessTooltipFigure.assignedMeta={0} assigned Metadata
|
||||
RepositoryFactoryProxyLabelProvider.NotFound=\ (Not Found)
|
||||
RepositoryFactoryProxyLabelProvider.Deleted=\ (Deleted)
|
||||
BusinessDiagramEditor.canNotSaveTitle=Warning
|
||||
BusinessDiagramEditor.canNotSaveMessage=Business Model is not locked by user, can not save.
|
||||
@@ -1,4 +1,3 @@
|
||||
AssignmentPropertySection.Type=Tip
|
||||
AssignmentPropertySection.Name=Ad\u0131
|
||||
BusinessInitDiagramFileAction.Error=Hata
|
||||
BusinessPaletteFactory.InputComment=Yeni giri\u015F olu\u015Ftur
|
||||
|
||||
@@ -79,6 +79,8 @@ BusinessPaletteFactory.Gear=Gear
|
||||
BusinessTooltipFigure.assignedMeta={0} assigned Metadata
|
||||
RepositoryFactoryProxyLabelProvider.NotFound=\ (Not Found)
|
||||
RepositoryFactoryProxyLabelProvider.Deleted=\ (Deleted)
|
||||
AssignmentPropertySection.Type=Type
|
||||
AssignmentPropertySection.Name=Name
|
||||
AssignmentPropertySection.Comment=Comment
|
||||
BusinessDiagramEditor.canNotSaveTitle=Warning
|
||||
BusinessDiagramEditor.canNotSaveMessage=Business Model is not locked by user, can not save.
|
||||
|
||||
|
||||
@@ -3,14 +3,4 @@ output.. = class/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin_en.properties,\
|
||||
plugin_zh_CN.properties\
|
||||
,plugin_ru.properties\
|
||||
,plugin_hr.properties\
|
||||
,plugin_fr.properties\
|
||||
,plugin_el.properties\
|
||||
,plugin_ja.properties\
|
||||
,plugin_it.properties\
|
||||
,plugin_es.properties\
|
||||
,plugin_pl.properties\
|
||||
,plugin_de.properties\
|
||||
,plugin_swtbot.properties
|
||||
plugin_zh.properties
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
pluginName = EmittersPool Model
|
||||
providerName = www.example.org
|
||||
components=Components
|
||||
trunjob=tRunJob
|
||||
format=Format
|
||||
@@ -87,7 +87,7 @@ FAMILY.Misc=Verschiedenes
|
||||
FAMILY.MySQL=MySQL
|
||||
FAMILY.Netezza=Netezza
|
||||
FAMILY.OLAP_Cube=OLAP Würfel
|
||||
FAMILY.Oracle=Oracle
|
||||
FAMILY.Oracle=Dieser Quellcode wurde automatisiert generiert durch {0}
|
||||
FAMILY.Orchestration=Instrumentation
|
||||
FAMILY.Output= Ausgabe
|
||||
FAMILY.ParAccel=Paraccel
|
||||
|
||||
@@ -130,4 +130,3 @@ FAMILY.Teradata=Teradata
|
||||
FAMILY.Vertica=Vertica
|
||||
FAMILY.VtigerCRM=VtigerCRM
|
||||
FAMILY.XML=XML
|
||||
CodeGeneratorEmittersPoolFactory.updatePaletteForEditors=Mettre à jour la palette pour les éditeurs
|
||||
|
||||
@@ -25,4 +25,3 @@ FAMILY.Input=Unos
|
||||
FAMILY.MySQL=MySQL
|
||||
FAMILY.Oracle=Oracle
|
||||
FAMILY.PostgreSQL=PostgreSQL
|
||||
FAMILY.XML=XML
|
||||
|
||||
@@ -130,4 +130,3 @@ FAMILY.Teradata=Teradata
|
||||
FAMILY.Vertica=Vertica
|
||||
FAMILY.VtigerCRM=VtigerCRM
|
||||
FAMILY.XML=XML
|
||||
CodeGeneratorEmittersPoolFactory.updatePaletteForEditors=\u30A8\u30C7\u30A3\u30BF\u306E\u30D1\u30EC\u30C3\u30C8\u306E\u66F4\u65B0
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
generatedcode.copyright.title=Copyright (c) 2005-2010, Talend Inc.
|
||||
generatedcode.copyright.body1=This source code has been automatically generated by {0}
|
||||
generatedcode.copyright.body2= / JobDesigner (CodeGenerator version {0}).
|
||||
generatedcode.copyright.body3=You can find more information about Talend products at www.talend.com.
|
||||
generatedcode.copyright.body4=You may distribute this code under the terms of the GNU LGPL license
|
||||
generatedcode.copyright.body5=(http://www.gnu.org/licenses/lgpl.html).
|
||||
generatedcode.footerprocess.nbcharsgenerated={0} characters generated by {1}
|
||||
CodeGenerator.getGraphicalNode1=------process.getGraphicalNodes()------
|
||||
CodeGenerator.getGraphicalNode2=------process.getGeneratingNodes()------
|
||||
CodeGenerator.JET.TimeOut=JET initialisation Time Out
|
||||
CodeGenerator.newLine=\n\n\n\n
|
||||
CodeGenerator.Node.NotFound=Node not found in current process
|
||||
JavaRoutineSynchronizer.UnsupportedOperation.Exception1=method not implemented: org.talend.designer.codegen.JavaRoutineSynchronizer line:49
|
||||
JavaRoutineSynchronizer.UnsupportedOperation.Exception2=method not implemented: org.talend.designer.codegen.JavaRoutineSynchronizer line:58
|
||||
JetSkeletonManager.unableLoad=unable to load skeleton update cache file
|
||||
JetSkeletonManager.unableSave=unable to save skeleton update cache file
|
||||
JetSkeletonManager.updateProblem=when update skeleton persistence data, there have some problems
|
||||
EmfEmittersPersistence.CodeGen.DataMissing=Code Generation Datas missing. Starting Full Code Generation.
|
||||
CodeGeneratorEmittersPoolFactory.PersitentData.Error=Persitent data cannot be saved :
|
||||
CodeGeneratorEmittersPoolFactory.JETEmitters.NoPresent=JETEmitters Project not present, full reinitialize is needed
|
||||
CodeGeneratorEmittersPoolFactory.Class.NotFound=Template still present, but class {0} has disapeared from workspace. This unit needs to be recompiled.
|
||||
CodeGeneratorEmittersPoolFactory.codeThread=Code generation background thread
|
||||
CodeGeneratorEmittersPoolFactory.componentCompiled=Components compiled in {0} ms
|
||||
CodeGeneratorEmittersPoolFactory.dialogContent=JetEmitter Generation is canceled,to avoid problems cause by this, please press Ctrl+Shift+F3 to generate again\!
|
||||
CodeGeneratorEmittersPoolFactory.failCompail=Components compile fail : \r\n
|
||||
EmittersPoolFactoryImpl.Class.IllegalArg=The class ' {0}' is not a valid classifier
|
||||
CodeGeneratorEmittersPoolFactory.initialException=Exception during Initialization
|
||||
CodeGeneratorEmittersPoolFactory.initMessage=Generation Engine Initialization in progress...
|
||||
CodeGeneratorEmittersPoolFactory.jetEmitterInitialException=Error during JetEmitter initalization
|
||||
CodeGeneratorEmittersPoolFactory.operationCanceled=Operation Canceled
|
||||
CodeGeneratorEmittersPoolFactory.updatePaletteForEditors=Update the palette for editors
|
||||
CodeGeneratorService.invalidLanguage1=invalid language type.
|
||||
CodeGeneratorService.invalidLanguage2=invalid language type.
|
||||
CodeGenInit.addMarkers=Adding markers to workspace
|
||||
CodeGenInit.createProject=create {0} project
|
||||
CodeGenInit.deleteProject=delete {0} project
|
||||
CodeGenInit.initTemplate=init Templates
|
||||
CodeGenInit.removeLink=Remove linked resources
|
||||
CodeGenInit.saveWorkspace=Saving workspace
|
||||
DocumentRootImpl.mixed=\ (mixed:
|
||||
NodesSubTree.enableParallel=__ENABLE_PARALLEL__
|
||||
PoolTypeImpl.persistentPool=\ (persistentPool: {0} )
|
||||
TalendJetEmitter.compileFail=\ compile fail : {0} : {1}
|
||||
TalendJetEmitter.exception=Exception on
|
||||
JetFilesProviderManager.unableLoad=Unable to load {0}JetFilesProviderManager.unableLoad=Unable to load {0}JetFilesProviderManager.unableLoad=Unable to load {0}
|
||||
ComponentsFactory.afterSystemComponent=after system component
|
||||
ComponentsFactory.componentNotFound=Component folder not found\:
|
||||
ComponentsFactory.load.components=Load Components...
|
||||
ComponentsFactory.parentNotRecompiled=Warning\: parents of *.inc.javajet are not recompiled \!
|
||||
ComponentsLocalProviderService.componentLoadError=Component load error
|
||||
ComponentsLocalProviderService.talendExchangeError=Talend Exchange Error
|
||||
ComponentsPreferencePage.ButtonLabel0=Ok
|
||||
ComponentsPreferencePage.configuration.LINK_STYLE=Default mapping links display as :
|
||||
ComponentsPreferencePage.rowLimit=Row limit
|
||||
ComponentsPreferencePage.WarningMsg=Need to restart Talend Open Studio to load extral components !
|
||||
ComponentsPreferencePage.WarningTitle=Warning
|
||||
ComponentsPreferencePage.directoryFieldLabel=User component folder\:
|
||||
ComponentsProviderManager.unableLoad=unable to load component provider
|
||||
ComponenttRunJobPreferencePage.label=Don't show corresponding job after double click on a tRunJob Component.
|
||||
ComponentJobletPreferencePage.label=Don't show corresponding job after double click on a Joblet Component.
|
||||
ComponenttRunJobPreferencePage.showCorrespondingJob=Show corresponding job after double click on a tRunJob Component.
|
||||
XsdValidationCacheManager.unableLoadxsd=unable to load xsd validation cache file
|
||||
XsdValidationCacheManager.unableSavexsd=unable to save xsd validation cache file
|
||||
prefs.configuration.LINK_STYLE.AUTO=Auto
|
||||
prefs.configuration.LINK_STYLE.BEZIER_CURVE=Curves
|
||||
prefs.configuration.LINK_STYLE.LINE=Lines (fast)
|
||||
FAMILY.AS400=AS400
|
||||
FAMILY.Access=Access
|
||||
FAMILY.Alfresco=Alfresco
|
||||
FAMILY.Business=Business
|
||||
FAMILY.Business_Intelligence=Business Intelligence
|
||||
FAMILY.CentricCRM=CentricCRM
|
||||
FAMILY.Charts=Charts
|
||||
FAMILY.Connections=Connections
|
||||
FAMILY.Custom_Code=Custom Code
|
||||
FAMILY.DB2=DB2
|
||||
FAMILY.DB_Generic=DB Generic
|
||||
FAMILY.DB_JDBC=DB JDBC
|
||||
FAMILY.DB_SCD=DB SCD
|
||||
FAMILY.Data_Quality=Data Quality
|
||||
FAMILY.Databases=Databases
|
||||
FAMILY.ELT=ELT
|
||||
FAMILY.ESB=ESB
|
||||
FAMILY.EXASolution=EXASolution
|
||||
FAMILY.eXist=eXist
|
||||
FAMILY.FTP=FTP
|
||||
FAMILY.Fields=Fields
|
||||
FAMILY.File=File
|
||||
FAMILY.FireBird=FireBird
|
||||
FAMILY.Greenplum=Greenplum
|
||||
FAMILY.HSQLDb=HSQLDb
|
||||
FAMILY.Healthcare=Healthcare
|
||||
FAMILY.Hive=Hive
|
||||
FAMILY.Informix=Informix
|
||||
FAMILY.Ingres=Ingres
|
||||
FAMILY.Input=Input
|
||||
FAMILY.Interbase=Interbase
|
||||
FAMILY.Internet=Internet
|
||||
FAMILY.Jasper=Jasper
|
||||
FAMILY.JavaDB=JavaDB
|
||||
FAMILY.JDBC=JDBC
|
||||
FAMILY.LDAP=LDAP
|
||||
FAMILY.Logs_Errors=Logs & Errors
|
||||
FAMILY.MS_SQL_Server=MS SQL Server
|
||||
FAMILY.MSSql=MSSql
|
||||
FAMILY.Management=Management
|
||||
FAMILY.MaxDB=MaxDB
|
||||
FAMILY.Microsoft_AX=Microsoft AX
|
||||
FAMILY.Microsoft_CRM=Microsoft CRM
|
||||
FAMILY.Misc=Misc
|
||||
FAMILY.MySQL=MySQL
|
||||
FAMILY.Netezza=Netezza
|
||||
FAMILY.OLAP_Cube=OLAP Cube
|
||||
FAMILY.Oracle=Oracle
|
||||
FAMILY.Orchestration=Orchestration
|
||||
FAMILY.Output=Output
|
||||
FAMILY.ParAccel=ParAccel
|
||||
FAMILY.PostgreSQL=PostgreSQL
|
||||
FAMILY.PostgresPlus=PostgresPlus
|
||||
FAMILY.Processing=Processing
|
||||
FAMILY.SAP=SAP
|
||||
FAMILY.Sas=Sas
|
||||
FAMILY.SCD=SCD
|
||||
FAMILY.SCP=SCP
|
||||
FAMILY.SPSS=SPSS
|
||||
FAMILY.SQLite=SQLite
|
||||
FAMILY.Salesforce=Salesforce
|
||||
FAMILY.SugarCRM=SugarCRM
|
||||
FAMILY.Sybase=Sybase
|
||||
FAMILY.System=System
|
||||
FAMILY.Technical=Technical
|
||||
FAMILY.Teradata=Teradata
|
||||
FAMILY.Vertica=Vertica
|
||||
FAMILY.VtigerCRM=VtigerCRM
|
||||
FAMILY.XML=XML
|
||||
@@ -106,7 +106,6 @@
|
||||
boolean hasCXFHTTPAuthConsumer = false;
|
||||
boolean hasCXFHTTPAuthProvider = false;
|
||||
boolean hasCXFComponentConsumer = false;
|
||||
boolean hasCXFComponentConsumerWithCXFMESSAGE = false;
|
||||
List<? extends INode> cxfNodes = process.getNodesOfType("cCXF");
|
||||
if( null != cxfNodes && cxfNodes.size() >0 ){
|
||||
hasCXFComponent = true;
|
||||
@@ -121,9 +120,6 @@
|
||||
if(!hasCXFComponentConsumer && incomingConnections>0){
|
||||
hasCXFComponentConsumer = true;
|
||||
}
|
||||
if(!hasCXFComponentConsumerWithCXFMESSAGE && incomingConnections>0 && "CXF_MESSAGE".equals(formatType)){
|
||||
hasCXFComponentConsumerWithCXFMESSAGE = true;
|
||||
}
|
||||
if("true".equals(useSecurity)){
|
||||
if("SAML".equals(securityType) && (!hasCXFSamlTokenProvider || !hasCXFSamlTokenConsumer)){
|
||||
if(incomingConnections == 0){
|
||||
@@ -523,64 +519,8 @@ if (isProvider) {
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
if(hasCXFComponentConsumerWithCXFMESSAGE){
|
||||
%>
|
||||
|
||||
/*
|
||||
* on CXF_MESSAGE case (call a service)
|
||||
* if the response is fault, then will run into problem
|
||||
*/
|
||||
private void addCXFMESSAGEFaultInterceptor(org.apache.camel.component.cxf.CxfEndpoint cxfEndpoint){
|
||||
cxfEndpoint.getBus().getInFaultInterceptors().add(new org.apache.cxf.interceptor.DocLiteralInInterceptor() {
|
||||
@Override
|
||||
public void handleMessage(org.apache.cxf.message.Message message) {
|
||||
// if has List content, then return
|
||||
if(message.getContent(java.util.List.class) != null){
|
||||
return;
|
||||
}
|
||||
if (isFaultMessage(message)) {
|
||||
org.apache.cxf.message.Message inFaultMessage = message
|
||||
.getExchange().getInFaultMessage();
|
||||
org.apache.cxf.message.MessageContentsList parameters = new org.apache.cxf.message.MessageContentsList();
|
||||
if (inFaultMessage != null) {
|
||||
org.apache.cxf.staxutils.W3CDOMStreamWriter content = inFaultMessage
|
||||
.get(org.apache.cxf.staxutils.W3CDOMStreamWriter.class);
|
||||
parameters.add(content);
|
||||
}
|
||||
message.setContent(java.util.List.class, parameters);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFaultMessage(org.apache.cxf.message.Message msg) {
|
||||
if (msg == null
|
||||
|| !(msg instanceof org.apache.cxf.binding.soap.SoapMessage)) {
|
||||
return false;
|
||||
}
|
||||
org.apache.cxf.binding.soap.SoapMessage message = (org.apache.cxf.binding.soap.SoapMessage) msg;
|
||||
|
||||
//if it's not a CXF_MESSAGE, then return false
|
||||
Object dataFormat = message.getContextualProperty(org.apache.camel.component.cxf.common.message.CxfConstants.DATA_FORMAT_PROPERTY);
|
||||
if(org.apache.camel.component.cxf.DataFormat.CXF_MESSAGE != dataFormat){
|
||||
return false;
|
||||
}
|
||||
|
||||
javax.xml.stream.XMLStreamReader xmlReader = message
|
||||
.getContent(javax.xml.stream.XMLStreamReader.class);
|
||||
if (xmlReader == null) {
|
||||
return false;
|
||||
}
|
||||
if (message.getVersion().getFault()
|
||||
.equals(xmlReader.getName())
|
||||
&& isRequestor(message)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
<%}%>
|
||||
|
||||
/**
|
||||
* please initial uri map
|
||||
*/
|
||||
@@ -639,11 +579,7 @@ if(hasCXFComponentConsumerWithCXFMESSAGE){
|
||||
}
|
||||
%>
|
||||
);
|
||||
<%
|
||||
if("CXF_MESSAGE".equals(formatType) && node.getIncomingConnections().size() > 0){
|
||||
%>
|
||||
addCXFMESSAGEFaultInterceptor(<%=endpointVar%>);
|
||||
<% }
|
||||
<%
|
||||
String useSL = ElementParameterParser.getValue(node, "__ENABLE_SL__");
|
||||
String useSAM = ElementParameterParser.getValue(node, "__ENABLE_SAM__");
|
||||
if ("true".equals(useSL)) {
|
||||
|
||||
@@ -167,9 +167,7 @@
|
||||
|
||||
|
||||
public int runJobInTOS(String[] args) {
|
||||
// reset status
|
||||
status = "";
|
||||
|
||||
|
||||
String lastStr = "";
|
||||
for (String arg : args) {
|
||||
if (arg.equalsIgnoreCase("--context_param")) {
|
||||
|
||||
@@ -493,6 +493,17 @@ private class TalendException extends java.lang.Exception {
|
||||
}
|
||||
}
|
||||
%>
|
||||
} else {
|
||||
<%
|
||||
if (isRunInMultiThread ) {
|
||||
%>
|
||||
((java.util.Map)threadLocal.get()).put("status", "failure");
|
||||
<%
|
||||
} else {%>
|
||||
status = "failure";
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
org.talend.designer.codegen/resources/spring.javajet
Normal file
18
org.talend.designer.codegen/resources/spring.javajet
Normal file
@@ -0,0 +1,18 @@
|
||||
<%@ jet
|
||||
package="org.talend.designer.codegen.translators"
|
||||
imports="
|
||||
org.talend.core.model.process.IContextParameter
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
java.util.List
|
||||
java.util.Properties
|
||||
java.io.ByteArrayOutputStream
|
||||
org.talend.core.model.utils.TalendTextUtils
|
||||
org.talend.core.model.process.IProcess2
|
||||
"
|
||||
class="Context"
|
||||
%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
IProcess2 p2 = (IProcess2) codeGenArgument.getArgument();
|
||||
%>
|
||||
<%=p2.getSpringContent() %>
|
||||
@@ -217,7 +217,7 @@
|
||||
<%
|
||||
}
|
||||
%>
|
||||
throw error;
|
||||
throw new java.lang.Error(error);
|
||||
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -457,7 +457,29 @@ public class CodeGenerator implements ICodeGenerator {
|
||||
if(!process2.needsSpring() || process2.getSpringContent() == null){
|
||||
return null;
|
||||
}
|
||||
return process2.getSpringContent();
|
||||
CodeGeneratorArgument codeGenArgument = new CodeGeneratorArgument();
|
||||
codeGenArgument.setJobName(jobName);
|
||||
|
||||
codeGenArgument.setJobVersion(jobVersion);
|
||||
codeGenArgument.setNode(process);
|
||||
codeGenArgument.setIsRunInMultiThread(getRunInMultiThread());
|
||||
codeGenArgument.setPauseTime(CorePlugin.getDefault().getRunProcessService().getPauseTime());
|
||||
|
||||
JetBean jetBean = initializeJetBean(codeGenArgument);
|
||||
|
||||
jetBean.setTemplateRelativeUri(TemplateUtil.RESOURCES_DIRECTORY + TemplateUtil.DIR_SEP
|
||||
+ EInternalTemplate.SPRING + TemplateUtil.EXT_SEP + language.getExtension() + TemplateUtil.TEMPLATE_EXT);
|
||||
|
||||
JetProxy proxy = new JetProxy(jetBean);
|
||||
try {
|
||||
return proxy.generate();
|
||||
} catch (JETException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new CodeGeneratorException(e);
|
||||
} catch (CoreException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new CodeGeneratorException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,14 +13,11 @@
|
||||
package org.talend.designer.codegen;
|
||||
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.components.ComponentCompilations;
|
||||
import org.talend.core.model.process.Element;
|
||||
import org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory;
|
||||
import org.talend.designer.core.IDesignerCoreService;
|
||||
import org.talend.designer.core.ui.views.properties.IComponentSettingsView;
|
||||
import org.talend.repository.model.ComponentsFactoryProvider;
|
||||
|
||||
/**
|
||||
@@ -43,16 +40,6 @@ public class RefreshTemplatesAction extends Action {
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
// TDI-25866:In case select a component and sctrl+shift+f3,need clean its componentSetting view
|
||||
IComponentSettingsView viewer = (IComponentSettingsView) PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getActivePage().findView(IComponentSettingsView.ID);
|
||||
|
||||
Element oldComponent = null;
|
||||
|
||||
if (viewer != null) {
|
||||
oldComponent = viewer.getElement();
|
||||
viewer.cleanDisplay();
|
||||
}
|
||||
ComponentCompilations.deleteMarkers();
|
||||
ComponentsFactoryProvider.getInstance().resetCache();
|
||||
CorePlugin.getDefault().getLibrariesService().syncLibraries();
|
||||
@@ -61,10 +48,6 @@ public class RefreshTemplatesAction extends Action {
|
||||
IDesignerCoreService designerCoreService = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(
|
||||
IDesignerCoreService.class);
|
||||
designerCoreService.getLastGeneratedJobsDateMap().clear();
|
||||
|
||||
if (oldComponent != null) {
|
||||
viewer.setElement(oldComponent);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.osgi.framework.Bundle;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.BusinessException;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.io.SHA1Util;
|
||||
import org.talend.commons.xml.XSDValidator;
|
||||
import org.talend.core.model.ModelPlugin;
|
||||
import org.talend.designer.core.model.components.ComponentFilesNaming;
|
||||
@@ -48,14 +49,18 @@ public class ComponentFileChecker {
|
||||
checkFiles(currentFolder, languageSuffix);
|
||||
File xmlMainFile = new File(currentFolder, ComponentFilesNaming.getInstance().getMainXMLFileName(currentFolder.getName(),
|
||||
languageSuffix));
|
||||
XsdValidationCacheManager xsdValidationCacheManager = XsdValidationCacheManager.getInstance();
|
||||
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
fis = new FileInputStream(xmlMainFile);
|
||||
String sha1 = SHA1Util.calculateFromTextStream(fis);
|
||||
// do not check anymore XSD when be in headless mode.
|
||||
// check is mainly usefull for GUI to be able to check why component is not loaded after be developped.
|
||||
// if be in headless mode (like commandline), it's supposed to use only stable components
|
||||
if (!CommonsPlugin.isHeadless()) {
|
||||
if (!CommonsPlugin.isHeadless() && xsdValidationCacheManager.needCheck(xmlMainFile, sha1)) {
|
||||
checkXSD(xmlMainFile);
|
||||
xsdValidationCacheManager.setChecked(xmlMainFile, sha1);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
ExceptionHandler.process(e);
|
||||
|
||||
@@ -14,24 +14,28 @@ package org.talend.designer.codegen.components.model;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.log4j.Priority;
|
||||
import org.eclipse.core.runtime.FileLocator;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
@@ -49,14 +53,10 @@ import org.osgi.framework.ServiceReference;
|
||||
import org.osgi.service.packageadmin.PackageAdmin;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.BusinessException;
|
||||
import org.talend.commons.ui.runtime.CommonUIPlugin;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.io.FilesUtils;
|
||||
import org.talend.commons.utils.io.SHA1Util;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.context.Context;
|
||||
import org.talend.core.context.RepositoryContext;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
import org.talend.core.model.component_cache.ComponentCachePackage;
|
||||
import org.talend.core.model.component_cache.ComponentInfo;
|
||||
@@ -69,6 +69,7 @@ import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.components.IComponentsFactory;
|
||||
import org.talend.core.model.components.IComponentsHandler;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.ComponentSetting;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
import org.talend.core.ui.images.CoreImageProvider;
|
||||
import org.talend.core.utils.TalendCacheUtils;
|
||||
@@ -81,7 +82,14 @@ import org.talend.designer.core.model.components.ComponentFilesNaming;
|
||||
import org.talend.designer.core.model.components.EmfComponent;
|
||||
import org.talend.designer.core.model.components.manager.ComponentManager;
|
||||
import org.talend.designer.core.model.process.AbstractProcessProvider;
|
||||
import org.talend.repository.model.ComponentsFactoryProvider;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.ErrorHandler;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXParseException;
|
||||
|
||||
/**
|
||||
* Component factory that look for each component and load their information. <br/>
|
||||
@@ -103,9 +111,9 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
|
||||
private static HashSet<IComponent> componentList = null;
|
||||
|
||||
private static HashSet<IComponent> customComponentList = null;
|
||||
private static List<IComponent> customComponentList = null;
|
||||
|
||||
private HashSet<IComponent> userComponentList = null;
|
||||
private List<IComponent> userComponentList = null;
|
||||
|
||||
private IProgressMonitor monitor;
|
||||
|
||||
@@ -119,6 +127,8 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
|
||||
private static Map<String, AbstractComponentsProvider> componentsAndProvider = new HashMap<String, AbstractComponentsProvider>();
|
||||
|
||||
private Map<String, String> allComponents;
|
||||
|
||||
// 1. only the in the directory /components ,not including /resource
|
||||
// 2. include the skeleton files and external include files
|
||||
private static ArrayList<String> skeletonList = null;
|
||||
@@ -127,13 +137,119 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
|
||||
private static final String INCLUDEFILEINJET_SUFFIX = ".inc.javajet"; //$NON-NLS-1$
|
||||
|
||||
private static final String FAMILY_SPEARATOR = "--FAMILY--"; //$NON-NLS-1$
|
||||
|
||||
private boolean isCreated = false;
|
||||
|
||||
private boolean isReset = false;
|
||||
|
||||
private IComponentsHandler componentsHandler;// Added by Marvin Wang on Jan. 11, 2012 for M/R.
|
||||
|
||||
private static boolean cleanDone = false;
|
||||
// public XmiResourceManager xmiResourceManager = new XmiResourceManager();
|
||||
|
||||
// this list of component is always needed, they must always be loaded at least, since they can be used for code
|
||||
// generation indirectly.
|
||||
// tFileInputFullRow + tSocketOutput : needed for DataViewer
|
||||
private static final String[] COMPONENTS_ALWAYS_NEEDED = { "tPrejob", "tPostjob", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"tJava", "tLibraryLoad", "tFileInputFullRow", "tSocketOutput", "tFilterRow", "tELTMysqlMap" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
|
||||
public ComponentsFactory() {
|
||||
if (!INCLUDEFILEINJET_SUFFIX.equals(".inc.javajet")) { //$NON-NLS-1$
|
||||
ExceptionHandler.process(new IllegalStateException(Messages.getString("ComponentsFactory.parentNotRecompiled")), //$NON-NLS-1$
|
||||
Priority.WARN);
|
||||
}
|
||||
}
|
||||
|
||||
private List<ComponentSetting> getComponentsFromProject() {
|
||||
// TODO check components used from ref projects.
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
if (currentProject != null && currentProject.getEmfProject() != null) {
|
||||
|
||||
List<ComponentSetting> components = currentProject.getEmfProject().getComponentsSettings();
|
||||
return components;
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
private boolean isComponentVisible(String componentName) {
|
||||
Boolean visible = Boolean.TRUE;
|
||||
|
||||
if (ArrayUtils.contains(COMPONENTS_ALWAYS_NEEDED, componentName)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
List<ComponentSetting> settingsFromCompName = new ArrayList<ComponentSetting>();
|
||||
// here we just check if the component is visible somewhere in the settings.
|
||||
// if it's visible in any category, we will load the component
|
||||
// if the component is unknown (new component?), we will load also
|
||||
// (technical components will always loaded by default as they're not saved in componentSettings)
|
||||
// to avoid any problem, we also load by default the category named "Technical".
|
||||
|
||||
for (ComponentSetting componentSetting : getComponentsFromProject()) {
|
||||
String name = componentSetting.getName();
|
||||
if (name != null && name.equals(componentName)) {
|
||||
settingsFromCompName.add(componentSetting);
|
||||
// if (componentSetting.isHidden()) {
|
||||
// // hide component only if hidden in all projects
|
||||
// if (manager.getReferencedProjects(manager.getCurrentProject()).size() > 0
|
||||
// && isHiddenInRefProjects(componentName)) {
|
||||
// visible = Boolean.FALSE;
|
||||
// } else {
|
||||
// visible = Boolean.TRUE;
|
||||
// componentSetting.setHidden(false);
|
||||
// }
|
||||
// } else {
|
||||
// return true;
|
||||
// }
|
||||
if ("Technical".equals(componentSetting.getFamily())) { //$NON-NLS-1$
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// load components those visible in any category
|
||||
int hideCount = 0;
|
||||
for (ComponentSetting componentSetting : settingsFromCompName) {
|
||||
if (componentSetting.isHidden()) {
|
||||
// hide component only if hidden in all projects
|
||||
if (isHiddenInRefProjects(componentSetting)) {
|
||||
hideCount++;
|
||||
} else {
|
||||
visible = Boolean.TRUE;
|
||||
componentSetting.setHidden(false);
|
||||
}
|
||||
} else {
|
||||
visible = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
if (settingsFromCompName.size() > 0 && hideCount == settingsFromCompName.size()) {
|
||||
visible = Boolean.FALSE;
|
||||
}
|
||||
|
||||
return visible;
|
||||
}
|
||||
|
||||
private boolean isHiddenInRefProjects(ComponentSetting settingInMain) {
|
||||
if (settingInMain == null) {
|
||||
return false;
|
||||
}
|
||||
int hiddenCount = 0;
|
||||
ProjectManager manager = ProjectManager.getInstance();
|
||||
List<Project> referencedProjects = manager.getReferencedProjects();
|
||||
for (Project curProject : referencedProjects) {
|
||||
List<ComponentSetting> componentsSettings = curProject.getEmfProject().getComponentsSettings();
|
||||
for (ComponentSetting setting : componentsSettings) {
|
||||
if (setting.isHidden() && setting.getName().equals(settingInMain.getName())
|
||||
&& setting.getFamily().equals(settingInMain.getFamily())) {
|
||||
hiddenCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hiddenCount == referencedProjects.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void init(boolean duringLogon) {
|
||||
@@ -143,74 +259,164 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
// TimeMeasure.display = true;
|
||||
// TimeMeasure.displaySteps = true;
|
||||
// TimeMeasure.measureActive = true;
|
||||
|
||||
// TimeMeasure.begin("initComponents");
|
||||
|
||||
componentList = new HashSet<IComponent>();
|
||||
customComponentList = new HashSet<IComponent>();
|
||||
customComponentList = new ArrayList<IComponent>();
|
||||
skeletonList = new ArrayList<String>();
|
||||
userComponentList = new HashSet<IComponent>();
|
||||
String installLocation = new Path(Platform.getConfigurationLocation().getURL().getPath()).toFile().getAbsolutePath();
|
||||
componentToProviderMap = new HashMap<IComponent, AbstractComponentsProvider>();
|
||||
boolean isNeedClean = !cleanDone && TalendCacheUtils.isSetCleanComponentCache();
|
||||
cleanDone = true; // only check this parameter one time, or it will reinitialize things all the time...
|
||||
boolean isNeedClean = TalendCacheUtils.cleanComponentCache();
|
||||
isCreated = hasComponentFile(installLocation) && !isNeedClean;
|
||||
ComponentsCache cache = ComponentManager.getComponentCache();
|
||||
if (isReset) {
|
||||
isCreated = false;
|
||||
}
|
||||
ComponentsCache cache = ComponentManager.getInstance();
|
||||
try {
|
||||
if (isCreated) {
|
||||
// if cache is created and empty, means we never loaded it before.
|
||||
// if it was already loaded, then no need to go again, since it's a static variable, it's still in
|
||||
// memory.
|
||||
// it avoids to reload from disk again even more for commandline at each logon, since it's no use.
|
||||
if (cache.getComponentEntryMap().isEmpty()) {
|
||||
ComponentsCache loadCache = loadComponentResource(installLocation);
|
||||
cache.getComponentEntryMap().putAll(loadCache.getComponentEntryMap());
|
||||
}
|
||||
ComponentsCache loadCache = loadComponentResource(installLocation);
|
||||
cache.getComponentEntryMap().putAll(loadCache.getComponentEntryMap());
|
||||
} else {
|
||||
cache.getComponentEntryMap().clear();
|
||||
}
|
||||
// check if any component is missing from any provider
|
||||
// if yes, re-create the cache.
|
||||
if (isCreated && isAnyComponentMissing()) {
|
||||
cache.getComponentEntryMap().clear();
|
||||
isCreated = false;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
cache.getComponentEntryMap().clear();
|
||||
isCreated = false;
|
||||
}
|
||||
|
||||
loadComponentsFromComponentsProviderExtension();
|
||||
// 1.Load Component from extension point: components_provider
|
||||
if (isCreated) {
|
||||
try {
|
||||
reloadComponentsFromCache();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
// if any exception happen, reset all cache
|
||||
cache.getComponentEntryMap().clear();
|
||||
isCreated = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isCreated) {
|
||||
loadComponentsFromComponentsProviderExtension();
|
||||
}
|
||||
|
||||
// TimeMeasure.step("initComponents", "loadComponentsFromProvider");
|
||||
// 2.Load Component from extension point: component_definition
|
||||
loadComponentsFromExtensions();
|
||||
// TimeMeasure.step("initComponents", "loadComponentsFromExtension[joblets?]");
|
||||
|
||||
ComponentManager.saveResource(); // will save only if needed.
|
||||
// TimeMeasure.step("initComponents", "reloadFromCache");
|
||||
|
||||
if (!isCreated) {
|
||||
XsdValidationCacheManager.getInstance().save();
|
||||
ComponentManager.saveResource();
|
||||
isReset = false;
|
||||
}
|
||||
// TimeMeasure.step("initComponents", "createCache");
|
||||
log.debug(componentList.size() + " components loaded in " + (System.currentTimeMillis() - startTime) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
if (!duringLogon) {
|
||||
// CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<String>(), null);
|
||||
}
|
||||
// TimeMeasure.step("initComponents", "updateLibraries");
|
||||
|
||||
// TimeMeasure.end("initComponents");
|
||||
|
||||
// TimeMeasure.display = false;
|
||||
// TimeMeasure.displaySteps = false;
|
||||
// TimeMeasure.measureActive = false;
|
||||
}
|
||||
|
||||
if (!CommonUIPlugin.isFullyHeadless()) {
|
||||
RepositoryContext repositoryContext = (RepositoryContext) CorePlugin.getContext().getProperty(
|
||||
Context.REPOSITORY_CONTEXT_KEY);
|
||||
if (repositoryContext == null) {
|
||||
return;
|
||||
private boolean isAnyComponentMissing() throws IOException {
|
||||
final Set<String> componentsList = ComponentManager.getInstance().getComponentEntryMap().keySet();
|
||||
|
||||
ECodeLanguage currentLanguage = LanguageManager.getCurrentLanguage();
|
||||
final FileFilter fileFilter = new FileFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(final File file) {
|
||||
return file.isDirectory() && file.getName().charAt(0) != '.'
|
||||
&& !file.getName().equals(IComponentsFactory.EXTERNAL_COMPONENTS_INNER_FOLDER)
|
||||
&& isComponentVisible(file.getName());
|
||||
}
|
||||
Project project = repositoryContext.getProject();
|
||||
if (project == null) {
|
||||
return;
|
||||
}
|
||||
org.talend.core.model.properties.Project emfProject = project.getEmfProject();
|
||||
if (emfProject == null) {
|
||||
return;
|
||||
}
|
||||
EList list = emfProject.getComponentsSettings();
|
||||
if (list.isEmpty()) {
|
||||
ComponentsFactoryProvider.saveComponentVisibilityStatus();
|
||||
};
|
||||
for (AbstractComponentsProvider componentsProvider : ComponentsProviderManager.getInstance().getProviders()) {
|
||||
File source = componentsProvider.getInstallationFolder();
|
||||
if (source != null && source.exists()) {
|
||||
for (File component : source.listFiles(fileFilter)) {
|
||||
if (!componentsList.contains(component.getName())) {
|
||||
String mainXmlFileName = ComponentFilesNaming.getInstance().getMainXMLFileName(component.getName(),
|
||||
currentLanguage.getName());
|
||||
File mainXmlFile = new File(component, mainXmlFileName);
|
||||
if (mainXmlFile.exists()) {
|
||||
return true;
|
||||
}
|
||||
// no xml file for this language, ignore it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC guanglong.du Comment method "reloadComponentsFromCache".
|
||||
*
|
||||
* @throws BusinessException
|
||||
*/
|
||||
private void reloadComponentsFromCache() throws BusinessException {
|
||||
ComponentsCache cache = ComponentManager.getInstance();
|
||||
Iterator it = cache.getComponentEntryMap().entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<String, EList<ComponentInfo>> entry = (Map.Entry<String, EList<ComponentInfo>>) it.next();
|
||||
EList<ComponentInfo> infoList = entry.getValue();
|
||||
String name = entry.getKey();
|
||||
if (!isComponentVisible(name)) {
|
||||
continue;
|
||||
}
|
||||
for (ComponentInfo info : infoList) {
|
||||
IBrandingService service = (IBrandingService) GlobalServiceRegister.getDefault().getService(
|
||||
IBrandingService.class);
|
||||
String[] availableComponents = service.getBrandingConfiguration().getAvailableComponents();
|
||||
EmfComponent currentComp = new EmfComponent(info.getUriString(), info.getSourceBundleName(), name,
|
||||
info.getPathSource(), cache, true);
|
||||
// if the component is not needed in the current branding,
|
||||
// and that this one IS NOT a specific component for code generation
|
||||
// just don't load it
|
||||
if (availableComponents != null
|
||||
&& !ArrayUtils.contains(availableComponents, currentComp.getName())
|
||||
&& !(ArrayUtils.contains(COMPONENTS_ALWAYS_NEEDED, currentComp.getName())
|
||||
|| currentComp.getOriginalFamilyName().contains("Technical") || currentComp.isTechnical())) { //$NON-NLS-1$
|
||||
continue;
|
||||
}
|
||||
// if the component is not needed in the current branding,
|
||||
// and that this one IS a specific component for code generation,
|
||||
// hide it
|
||||
if (availableComponents != null
|
||||
&& !ArrayUtils.contains(availableComponents, currentComp.getName())
|
||||
&& (ArrayUtils.contains(COMPONENTS_ALWAYS_NEEDED, currentComp.getName())
|
||||
|| currentComp.getOriginalFamilyName().contains("Technical") || currentComp.isTechnical())) { //$NON-NLS-1$
|
||||
currentComp.setVisible(false);
|
||||
currentComp.setTechnical(true);
|
||||
}
|
||||
currentComp.setPaletteType(currentComp.getType());
|
||||
|
||||
if (!componentList.contains(currentComp)) {
|
||||
currentComp.setResourceBundle(getComponentResourceBundle(currentComp,
|
||||
ComponentBundleToPath.getPathFromBundle(info.getSourceBundleName()) + info.getUriString(),
|
||||
info.getPathSource(), null));
|
||||
componentList.add(currentComp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -258,6 +464,15 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
}
|
||||
}
|
||||
|
||||
public void loadComponentsFromExtension(String id) {
|
||||
ComponentsProviderManager componentsProviderManager = ComponentsProviderManager.getInstance();
|
||||
for (AbstractComponentsProvider componentsProvider : componentsProviderManager.getProviders()) {
|
||||
if (componentsProvider.getId() != null && componentsProvider.getId().equals(id)) {
|
||||
loadComponents(componentsProvider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loadComponents(AbstractComponentsProvider componentsProvider) {
|
||||
if (componentsProvider != null) {
|
||||
try {
|
||||
@@ -278,8 +493,8 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
ComponentsProviderManager componentsProviderManager = ComponentsProviderManager.getInstance();
|
||||
AbstractComponentsProvider componentsProvider = componentsProviderManager.loadUserComponentsProvidersFromExtension();
|
||||
// remove old user components
|
||||
if (!this.userComponentList.isEmpty()) {
|
||||
ComponentsCache cache = ComponentManager.getComponentCache();
|
||||
if (this.userComponentList != null) {
|
||||
ComponentsCache cache = ComponentManager.getInstance();
|
||||
for (IComponent component : userComponentList) {
|
||||
if (componentList != null && componentList.contains(component)) {
|
||||
componentList.remove(component);
|
||||
@@ -289,12 +504,13 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
}
|
||||
if (cache.getComponentEntryMap().get(component.getName()) != null) {
|
||||
cache.getComponentEntryMap().remove(component.getName());
|
||||
ComponentManager.setModified(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
loadComponents(componentsProvider);
|
||||
ComponentManager.saveResource();
|
||||
if (!CommonsPlugin.isHeadless()) {
|
||||
ComponentManager.saveResource();
|
||||
}
|
||||
}
|
||||
|
||||
private void removeOldComponentsUserFolder() {
|
||||
@@ -314,6 +530,17 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
}
|
||||
|
||||
private void loadComponentsFromFolder(String pathSource, AbstractComponentsProvider provider) {
|
||||
|
||||
if (pathSource != null) {
|
||||
Path userComponent = new Path(pathSource);
|
||||
Path templatePath = new Path(IComponentsFactory.COMPONENTS_INNER_FOLDER + File.separatorChar
|
||||
+ IComponentsFactory.EXTERNAL_COMPONENTS_INNER_FOLDER + File.separatorChar
|
||||
+ ComponentUtilities.getExtFolder(OLD_COMPONENTS_USER_INNER_FOLDER));
|
||||
if (userComponent.equals(templatePath)) {
|
||||
this.userComponentList = new ArrayList<IComponent>();
|
||||
}
|
||||
}
|
||||
|
||||
boolean isCustom = false;
|
||||
if ("org.talend.designer.components.model.UserComponentsProvider".equals(provider.getId())
|
||||
|| "org.talend.designer.components.exchange.ExchangeComponentsProvider".equals(provider.getId())) {
|
||||
@@ -334,7 +561,8 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
@Override
|
||||
public boolean accept(final File file) {
|
||||
return file.isDirectory() && file.getName().charAt(0) != '.'
|
||||
&& !file.getName().equals(IComponentsFactory.EXTERNAL_COMPONENTS_INNER_FOLDER);
|
||||
&& !file.getName().equals(IComponentsFactory.EXTERNAL_COMPONENTS_INNER_FOLDER)
|
||||
&& isComponentVisible(file.getName());
|
||||
}
|
||||
|
||||
};
|
||||
@@ -371,17 +599,19 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
if (context == null) {
|
||||
context = CodeGeneratorActivator.getDefault().getBundle().getBundleContext();
|
||||
}
|
||||
|
||||
// if (Platform.getProduct() != null) {
|
||||
// context = Platform.getProduct().getDefiningBundle().getBundleContext();
|
||||
// } else {
|
||||
// context = CodeGeneratorActivator.getDefault().getBundle().getBundleContext();
|
||||
// }
|
||||
// if (context == null) {
|
||||
// context = Platform.getProduct().getDefiningBundle().getBundleContext();
|
||||
// if (context == null)
|
||||
// context = CodeGeneratorActivator.getDefault().getBundle().getBundleContext();
|
||||
// }
|
||||
ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
|
||||
PackageAdmin admin = (PackageAdmin) context.getService(sref);
|
||||
|
||||
String bundleName;
|
||||
if (!isCustom) {
|
||||
bundleName = admin.getBundle(provider.getClass()).getSymbolicName();
|
||||
} else {
|
||||
bundleName = IComponentsFactory.COMPONENTS_LOCATION;
|
||||
}
|
||||
|
||||
if (childDirectories != null) {
|
||||
if (monitor != null) {
|
||||
this.subMonitor = SubMonitor.convert(monitor,
|
||||
@@ -399,63 +629,34 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
}
|
||||
|
||||
try {
|
||||
ComponentFileChecker.checkComponentFolder(currentFolder, getCodeLanguageSuffix());
|
||||
File xmlMainFile = new File(currentFolder, ComponentFilesNaming.getInstance().getMainXMLFileName(
|
||||
currentFolder.getName(), getCodeLanguageSuffix()));
|
||||
if (!xmlMainFile.exists()) {
|
||||
// if not a component folder, ignore it.
|
||||
continue;
|
||||
}
|
||||
String currentXmlSha1 = null;
|
||||
try {
|
||||
currentXmlSha1 = SHA1Util.calculateFromTextStream(new FileInputStream(xmlMainFile));
|
||||
} catch (FileNotFoundException e) {
|
||||
// nothing since exceptions are directly in the check bellow
|
||||
}
|
||||
// Need to check if this component is already in the cache or not.
|
||||
// if yes, then we compare the sha1... and if different we reload the component
|
||||
// if component is not in the cache, of course just load it!
|
||||
ComponentsCache cache = ComponentManager.getComponentCache();
|
||||
boolean foundComponentIsSame = false;
|
||||
ComponentInfo existingComponentInfoInCache = null;
|
||||
if (cache.getComponentEntryMap().containsKey(currentFolder.getName())) {
|
||||
EList<ComponentInfo> infos = cache.getComponentEntryMap().get(currentFolder.getName());
|
||||
for (ComponentInfo info : infos) {
|
||||
if (StringUtils.equals(bundleName, info.getSourceBundleName())) {
|
||||
existingComponentInfoInCache = info;
|
||||
if (StringUtils.equals(info.getSha1(), currentXmlSha1)) {
|
||||
foundComponentIsSame = true;
|
||||
}
|
||||
break; // found component, no matter changed or not
|
||||
}
|
||||
}
|
||||
}
|
||||
if (foundComponentIsSame) {
|
||||
// check if component is already loaded in memory, if yes it will only reload existing xml
|
||||
// it should go here mainly for commandline or if use like ctrl+shift+f3
|
||||
if (componentsCache.containsKey(xmlMainFile.getAbsolutePath())) {
|
||||
IComponent componentFromThisProvider = null;
|
||||
for (IComponent component : componentsCache.get(xmlMainFile.getAbsolutePath()).values()) {
|
||||
if (component instanceof EmfComponent) {
|
||||
if (bundleName.equals(((EmfComponent) component).getSourceBundleName())) {
|
||||
componentFromThisProvider = component;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (componentFromThisProvider != null) {
|
||||
// In headless mode, we assume the components won't change and we will use a cache
|
||||
componentList.add(componentFromThisProvider);
|
||||
if (isCustom) {
|
||||
customComponentList.add(componentFromThisProvider);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!foundComponentIsSame) {
|
||||
ComponentFileChecker.checkComponentFolder(currentFolder, getCodeLanguageSuffix());
|
||||
}
|
||||
|
||||
String bundleName;
|
||||
if (!isCustom) {
|
||||
bundleName = admin.getBundle(provider.getClass()).getSymbolicName();
|
||||
} else {
|
||||
bundleName = IComponentsFactory.COMPONENTS_LOCATION;
|
||||
}
|
||||
if (CommonsPlugin.isHeadless() && componentsCache.containsKey(xmlMainFile.getAbsolutePath())) {
|
||||
IComponent componentFromThisProvider = null;
|
||||
for (IComponent component : componentsCache.get(xmlMainFile.getAbsolutePath()).values()) {
|
||||
if (component instanceof EmfComponent) {
|
||||
if (bundleName.equals(((EmfComponent) component).getSourceBundleName())) {
|
||||
componentFromThisProvider = component;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (componentFromThisProvider != null) {
|
||||
// In headless mode, we assume the components won't change and we will use a cache
|
||||
componentList.add(componentFromThisProvider);
|
||||
if (isCustom) {
|
||||
customComponentList.add(componentFromThisProvider);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
String pathName = xmlMainFile.getAbsolutePath();
|
||||
|
||||
String applicationPath = ComponentBundleToPath.getPathFromBundle(bundleName);
|
||||
@@ -463,41 +664,30 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
// pathName = C:\myapp\plugins\myplugin\components\mycomponent\mycomponent.xml
|
||||
pathName = (new Path(pathName)).toPortableString();
|
||||
// pathName = C:/myapp/plugins/myplugin/components/mycomponent/mycomponent.xml
|
||||
pathName = pathName.replace(applicationPath, ""); //$NON-NLS-1$
|
||||
pathName = pathName.replace(applicationPath, "");
|
||||
|
||||
// pathName = /components/mycomponent/mycomponent.xml
|
||||
|
||||
// if not already in memory, just load the component from cache.
|
||||
// if the component is already existing in cache and if it's the same, it won't reload all (cf
|
||||
// flag: foundComponentIsSame)
|
||||
EmfComponent currentComp = new EmfComponent(pathName, bundleName, xmlMainFile.getParentFile().getName(),
|
||||
pathSource, cache, foundComponentIsSame);
|
||||
if (!foundComponentIsSame) {
|
||||
// force to call some functions to update the cache. (to improve)
|
||||
currentComp.isVisibleInComponentDefinition();
|
||||
currentComp.isTechnical();
|
||||
currentComp.getOriginalFamilyName();
|
||||
currentComp.getTranslatedFamilyName();
|
||||
currentComp.getPluginExtension();
|
||||
currentComp.getVersion();
|
||||
currentComp.getModulesNeeded();
|
||||
currentComp.getPluginDependencies();
|
||||
// end of force cache update.
|
||||
|
||||
EList<ComponentInfo> componentsInfo = cache.getComponentEntryMap().get(currentFolder.getName());
|
||||
for (ComponentInfo cInfo : componentsInfo) {
|
||||
if (cInfo.getSourceBundleName().equals(bundleName)) {
|
||||
cInfo.setSha1(currentXmlSha1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ComponentManager.setModified(true); // this will force to save the cache later.
|
||||
}
|
||||
pathSource, ComponentManager.getInstance(), isCreated);
|
||||
// force to call some functions to update the cache. (to improve)
|
||||
currentComp.isVisibleInComponentDefinition();
|
||||
currentComp.isTechnical();
|
||||
currentComp.getOriginalFamilyName();
|
||||
currentComp.getTranslatedFamilyName();
|
||||
currentComp.getPluginExtension();
|
||||
currentComp.getVersion();
|
||||
currentComp.getModulesNeeded();
|
||||
currentComp.getPluginDependencies();
|
||||
// end of force cache update.
|
||||
|
||||
// if the component is not needed in the current branding,
|
||||
// and that this one IS NOT a specific component for code generation
|
||||
// just don't load it
|
||||
if (availableComponents != null && !ArrayUtils.contains(availableComponents, currentComp.getName())
|
||||
&& !(currentComp.getOriginalFamilyName().contains("Technical") || currentComp.isTechnical())) {
|
||||
if (availableComponents != null
|
||||
&& !ArrayUtils.contains(availableComponents, currentComp.getName())
|
||||
&& !(ArrayUtils.contains(COMPONENTS_ALWAYS_NEEDED, currentComp.getName())
|
||||
|| currentComp.getOriginalFamilyName().contains("Technical") || currentComp.isTechnical())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -506,8 +696,10 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
// if the component is not needed in the current branding,
|
||||
// and that this one IS a specific component for code generation,
|
||||
// hide it
|
||||
if (availableComponents != null && !ArrayUtils.contains(availableComponents, currentComp.getName())
|
||||
&& (currentComp.getOriginalFamilyName().contains("Technical") || currentComp.isTechnical())) {
|
||||
if (availableComponents != null
|
||||
&& !ArrayUtils.contains(availableComponents, currentComp.getName())
|
||||
&& (ArrayUtils.contains(COMPONENTS_ALWAYS_NEEDED, currentComp.getName())
|
||||
|| currentComp.getOriginalFamilyName().contains("Technical") || currentComp.isTechnical())) {
|
||||
currentComp.setVisible(false);
|
||||
currentComp.setTechnical(true);
|
||||
}
|
||||
@@ -537,13 +729,13 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
}
|
||||
}
|
||||
|
||||
// componentsCache only used bellow in case of headless (commandline) or if use like
|
||||
// ctrl+shift+f3
|
||||
String componentName = xmlMainFile.getAbsolutePath();
|
||||
if (!componentsCache.containsKey(componentName)) {
|
||||
componentsCache.put(componentName, new HashMap<String, IComponent>());
|
||||
if (CommonsPlugin.isHeadless()) {
|
||||
String componentName = xmlMainFile.getAbsolutePath();
|
||||
if (!componentsCache.containsKey(componentName)) {
|
||||
componentsCache.put(componentName, new HashMap<String, IComponent>());
|
||||
}
|
||||
componentsCache.get(xmlMainFile.getAbsolutePath()).put(currentComp.getPaletteType(), currentComp);
|
||||
}
|
||||
componentsCache.get(xmlMainFile.getAbsolutePath()).put(currentComp.getPaletteType(), currentComp);
|
||||
} catch (MissingMainXMLComponentFileException e) {
|
||||
log.trace(currentFolder.getName() + " is not a " + getCodeLanguageSuffix() + " component", e); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
} catch (BusinessException e) {
|
||||
@@ -764,7 +956,25 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
if (customComponentList == null) {
|
||||
init(false);
|
||||
}
|
||||
return new ArrayList<IComponent>(customComponentList);
|
||||
return customComponentList;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.core.model.components.IComponentsFactory#getComponentPath()
|
||||
*/
|
||||
@Override
|
||||
public URL getComponentPath() throws IOException {
|
||||
String componentsPath = IComponentsFactory.COMPONENTS_LOCATION;
|
||||
IBrandingService breaningService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
|
||||
IBrandingService.class);
|
||||
if (breaningService.isPoweredOnlyCamel()) {
|
||||
componentsPath = IComponentsFactory.CAMEL_COMPONENTS_LOCATION;
|
||||
}
|
||||
Bundle b = Platform.getBundle(componentsPath);
|
||||
URL url = FileLocator.toFileURL(FileLocator.find(b, new Path(IComponentsFactory.COMPONENTS_INNER_FOLDER), null));
|
||||
return url;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -785,6 +995,7 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
componentList = null;
|
||||
skeletonList = null;
|
||||
customComponentList = null;
|
||||
allComponents = null;
|
||||
|
||||
}
|
||||
|
||||
@@ -793,6 +1004,8 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
componentList = null;
|
||||
skeletonList = null;
|
||||
customComponentList = null;
|
||||
allComponents = null;
|
||||
isReset = true;
|
||||
if (!CommonsPlugin.isHeadless()) {
|
||||
CoreImageProvider.clearComponentIconImages();
|
||||
}
|
||||
@@ -830,6 +1043,150 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
return translated;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.core.model.components.IComponentsFactory#getAllComponentsCanBeProvided()
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> getAllComponentsCanBeProvided() {
|
||||
List source = new ArrayList();
|
||||
if (allComponents == null) {
|
||||
allComponents = new HashMap<String, String>();
|
||||
source.add(IComponentsFactory.COMPONENTS_INNER_FOLDER);
|
||||
ComponentsProviderManager componentsProviderManager = ComponentsProviderManager.getInstance();
|
||||
source.addAll(componentsProviderManager.getProviders());
|
||||
for (int i = 0; i < source.size(); i++) {
|
||||
String path = null;
|
||||
AbstractComponentsProvider provider = null;
|
||||
Object object = source.get(i);
|
||||
if (object instanceof String) {
|
||||
path = (String) object;
|
||||
} else if (object instanceof AbstractComponentsProvider) {
|
||||
provider = ((AbstractComponentsProvider) object);
|
||||
path = provider.getComponentsLocation();
|
||||
}
|
||||
if (path != null) {
|
||||
// **if the components is from provider,should get components from provider path,see bug TDI-18036
|
||||
File sourceFile = getComponentsLocation(path, provider);
|
||||
File[] childDirectories;
|
||||
|
||||
FileFilter fileFilter = new FileFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(final File file) {
|
||||
return file.isDirectory() && file.getName().charAt(0) != '.'
|
||||
&& !file.getName().equals(IComponentsFactory.EXTERNAL_COMPONENTS_INNER_FOLDER);
|
||||
}
|
||||
|
||||
};
|
||||
if (sourceFile == null) {
|
||||
ExceptionHandler.process(new Exception("Component Not Found")); //$NON-NLS-1$
|
||||
continue;
|
||||
}
|
||||
|
||||
childDirectories = sourceFile.listFiles(fileFilter);
|
||||
if (childDirectories != null) {
|
||||
for (File currentFolder : childDirectories) {
|
||||
try {
|
||||
ComponentFileChecker.checkComponentFolder(currentFolder, getCodeLanguageSuffix());
|
||||
} catch (BusinessException e) {
|
||||
continue;
|
||||
}
|
||||
File xmlMainFile = new File(currentFolder, ComponentFilesNaming.getInstance().getMainXMLFileName(
|
||||
currentFolder.getName(), getCodeLanguageSuffix()));
|
||||
List<String> families = getComponentsFamilyFromXML(xmlMainFile);
|
||||
if (families != null) {
|
||||
for (String family : families) {
|
||||
allComponents.put(family + FAMILY_SPEARATOR + currentFolder.getName(),
|
||||
currentFolder.getName() + "_32");
|
||||
if (object instanceof AbstractComponentsProvider) {
|
||||
if (!componentsAndProvider.containsKey(family)) {
|
||||
componentsAndProvider.put(family, (AbstractComponentsProvider) object);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return allComponents;
|
||||
}
|
||||
|
||||
private List<String> getComponentsFamilyFromXML(File xmlMainFile) {
|
||||
final DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();
|
||||
final String familysTag = "FAMILIES"; //$NON-NLS-1$
|
||||
final String header = "HEADER"; //$NON-NLS-1$
|
||||
final String technical = "TECHNICAL"; //$NON-NLS-1$
|
||||
|
||||
List<String> familyNames = new ArrayList<String>();
|
||||
|
||||
DocumentBuilder analyseur;
|
||||
try {
|
||||
analyseur = fabrique.newDocumentBuilder();
|
||||
analyseur.setErrorHandler(new ErrorHandler() {
|
||||
|
||||
@Override
|
||||
public void error(final SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fatalError(final SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warning(final SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Document document = analyseur.parse(xmlMainFile);
|
||||
NodeList elementsByTagName = document.getElementsByTagName(header);
|
||||
String technicalValue = null;
|
||||
if (elementsByTagName != null && elementsByTagName.getLength() > 0) {
|
||||
Node item = elementsByTagName.item(0);
|
||||
NamedNodeMap attributes = item.getAttributes();
|
||||
if (attributes != null) {
|
||||
Node namedItem = attributes.getNamedItem(technical);
|
||||
if (namedItem != null) {
|
||||
technicalValue = namedItem.getNodeValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
// techenical node are not visible ,so no need to return it's family
|
||||
if (technicalValue == null || !"true".equals(technicalValue)) { //$NON-NLS-1$
|
||||
NodeList element = document.getElementsByTagName(familysTag);
|
||||
if (element != null && element.getLength() > 0) {
|
||||
Node family = element.item(0);
|
||||
NodeList childNodes = family.getChildNodes();
|
||||
for (int i = 0; i < childNodes.getLength(); i++) {
|
||||
final Node item = childNodes.item(i);
|
||||
if (item instanceof com.sun.org.apache.xerces.internal.dom.DeferredElementImpl
|
||||
|| item instanceof org.apache.xerces.dom.DeferredElementImpl) {
|
||||
familyNames.add(item.getTextContent());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (ParserConfigurationException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (SAXException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
return familyNames;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.designer.codegen.components.model;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.talend.designer.codegen.CodeGeneratorActivator;
|
||||
import org.talend.designer.codegen.i18n.Messages;
|
||||
|
||||
/**
|
||||
* tfeng class global comment. Detailled comment <br/>
|
||||
*
|
||||
* $Id: talend.epf 1 2006-09-29 17:06:40Z nrousseau $
|
||||
*
|
||||
*/
|
||||
public class XsdValidationCacheManager {
|
||||
|
||||
private Map<String, String> alreadyCheckedXsd = new HashMap<String, String>();
|
||||
|
||||
private static XsdValidationCacheManager instance;
|
||||
|
||||
private XsdValidationCacheManager() {
|
||||
}
|
||||
|
||||
public synchronized static XsdValidationCacheManager getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new XsdValidationCacheManager();
|
||||
instance.load();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void load() {
|
||||
try {
|
||||
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(".JETEmitters"); //$NON-NLS-1$
|
||||
if (project.exists()) {
|
||||
deserializeAlreadyChecked();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
IStatus status = new Status(IStatus.WARNING, CodeGeneratorActivator.PLUGIN_ID,
|
||||
Messages.getString("XsdValidationCacheManager.unableLoadxsd"), e); //$NON-NLS-1$
|
||||
CodeGeneratorActivator.getDefault().getLog().log(status);
|
||||
}
|
||||
}
|
||||
|
||||
public void save() {
|
||||
try {
|
||||
serializeAlreadyChecked();
|
||||
} catch (Exception e) {
|
||||
IStatus status = new Status(IStatus.WARNING, CodeGeneratorActivator.PLUGIN_ID,
|
||||
Messages.getString("XsdValidationCacheManager.unableSavexsd"), e); //$NON-NLS-1$
|
||||
CodeGeneratorActivator.getDefault().getLog().log(status);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean needCheck(java.io.File file, String sha1) {
|
||||
String name = file.getName();
|
||||
String oldName = alreadyCheckedXsd.get(sha1);
|
||||
if (oldName == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean isChanged = !StringUtils.equals(name, oldName);
|
||||
return isChanged;
|
||||
}
|
||||
|
||||
public void setChecked(File file, String sha1) {
|
||||
String name = file.getName();
|
||||
alreadyCheckedXsd.put(sha1, name);
|
||||
}
|
||||
|
||||
private File getSerializationFilePath() throws CoreException {
|
||||
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(".JETEmitters"); //$NON-NLS-1$
|
||||
if (!project.exists()) {
|
||||
project.create(new NullProgressMonitor());
|
||||
}
|
||||
if (!project.isOpen()) {
|
||||
project.open(new NullProgressMonitor());
|
||||
}
|
||||
IFile file = project.getFile("XsdValidationCache"); //$NON-NLS-1$
|
||||
if (!file.exists()) {
|
||||
file.create(null, true, new NullProgressMonitor());
|
||||
}
|
||||
return file.getLocation().toFile();
|
||||
}
|
||||
|
||||
private void serializeAlreadyChecked() throws IOException, CoreException {
|
||||
BufferedOutputStream bufferedOutputStream = null;
|
||||
try {
|
||||
bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(getSerializationFilePath()));
|
||||
ObjectOutputStream objectOut = new ObjectOutputStream(bufferedOutputStream);
|
||||
objectOut.writeObject(alreadyCheckedXsd);
|
||||
} catch (IOException e) {
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
bufferedOutputStream.close();
|
||||
} catch (Exception e) {
|
||||
// ignore me even if i'm null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void deserializeAlreadyChecked() throws Exception {
|
||||
alreadyCheckedXsd = new HashMap<String, String>();
|
||||
|
||||
File file = getSerializationFilePath();
|
||||
if (!file.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
BufferedInputStream bufferedInputStream = null;
|
||||
try {
|
||||
bufferedInputStream = new BufferedInputStream(new FileInputStream(file));
|
||||
ObjectInputStream objectIn = new ObjectInputStream(bufferedInputStream);
|
||||
Object object = objectIn.readObject();
|
||||
if (object instanceof Map) {
|
||||
Map<?, ?> map = (Map<?, ?>) (object);
|
||||
for (Map.Entry<?, ?> entry : map.entrySet()) {
|
||||
String key = entry.getKey().toString();
|
||||
Object value = entry.getValue();
|
||||
if (value instanceof String) {
|
||||
alreadyCheckedXsd.put(key, (String) value);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
bufferedInputStream.close();
|
||||
} catch (Exception e) {
|
||||
// ignore me even if i'm null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,9 +19,6 @@ import org.eclipse.core.runtime.ProgressMonitorWrapper;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.swt.SWTException;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.gmf.util.DisplayUtils;
|
||||
import org.talend.commons.ui.runtime.CommonUIPlugin;
|
||||
|
||||
/**
|
||||
* DOC mhirt class global comment. Detailled comment <br/>
|
||||
@@ -63,7 +60,6 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
/**
|
||||
* @see IProgressMonitor#beginTask
|
||||
*/
|
||||
@Override
|
||||
public void beginTask(String name, int totalWork) {
|
||||
super.beginTask(name, totalWork);
|
||||
taskName = name;
|
||||
@@ -75,28 +71,13 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
*
|
||||
* @see org.eclipse.core.runtime.IProgressMonitorWithBlocking#clearBlocked()
|
||||
*/
|
||||
@Override
|
||||
public void clearBlocked() {
|
||||
// Run the event loop.
|
||||
if (CommonUIPlugin.isFullyHeadless()) {
|
||||
return;
|
||||
}
|
||||
final Display disp = DisplayUtils.getDisplay();
|
||||
|
||||
disp.syncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Dialog.getBlockedHandler().clearBlocked();
|
||||
}
|
||||
|
||||
});
|
||||
Dialog.getBlockedHandler().clearBlocked();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IProgressMonitor#done
|
||||
*/
|
||||
@Override
|
||||
public void done() {
|
||||
super.done();
|
||||
taskName = null;
|
||||
@@ -106,7 +87,6 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
/**
|
||||
* @see IProgressMonitor#internalWorked
|
||||
*/
|
||||
@Override
|
||||
public void internalWorked(double work) {
|
||||
super.internalWorked(work);
|
||||
runEventLoop();
|
||||
@@ -115,7 +95,6 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
/**
|
||||
* @see IProgressMonitor#isCanceled
|
||||
*/
|
||||
@Override
|
||||
public boolean isCanceled() {
|
||||
runEventLoop();
|
||||
return super.isCanceled();
|
||||
@@ -127,42 +106,33 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
private void runEventLoop() {
|
||||
// Only run the event loop so often, as it is expensive on some platforms
|
||||
// (namely Motif).
|
||||
final long t = System.currentTimeMillis();
|
||||
long t = System.currentTimeMillis();
|
||||
if (t - lastTime < tTHRESH) {
|
||||
return;
|
||||
}
|
||||
lastTime = t;
|
||||
// Run the event loop.
|
||||
if (CommonUIPlugin.isFullyHeadless()) {
|
||||
return;
|
||||
}
|
||||
final Display disp = DisplayUtils.getDisplay();
|
||||
Display disp = Display.getDefault();
|
||||
if (disp == null) {
|
||||
return;
|
||||
}
|
||||
disp.syncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for (;;) {
|
||||
try {
|
||||
if (!disp.readAndDispatch()) {
|
||||
break;
|
||||
}
|
||||
} catch (SWTException se) {
|
||||
// do nothing;
|
||||
}
|
||||
|
||||
// Only run the event loop for so long.
|
||||
// Otherwise, this would never return if some other thread was
|
||||
// constantly generating events.
|
||||
if (System.currentTimeMillis() - t > tMAX) {
|
||||
break;
|
||||
}
|
||||
for (;;) {
|
||||
try {
|
||||
if (!disp.readAndDispatch()) {
|
||||
break;
|
||||
}
|
||||
} catch (SWTException se) {
|
||||
// do nothing;
|
||||
}
|
||||
|
||||
});
|
||||
// Only run the event loop for so long.
|
||||
// Otherwise, this would never return if some other thread was
|
||||
// constantly generating events.
|
||||
if (System.currentTimeMillis() - t > tMAX) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -170,29 +140,13 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
*
|
||||
* @see org.eclipse.core.runtime.IProgressMonitorWithBlocking#setBlocked(org.eclipse.core.runtime.IStatus)
|
||||
*/
|
||||
@Override
|
||||
public void setBlocked(final IStatus reason) {
|
||||
// Run the event loop.
|
||||
if (CommonUIPlugin.isFullyHeadless()) {
|
||||
ExceptionHandler.process(reason.getException());
|
||||
return;
|
||||
}
|
||||
final Display disp = DisplayUtils.getDisplay();
|
||||
|
||||
disp.syncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Dialog.getBlockedHandler().showBlocked(CodeGeneratorProgressMonitor.this, reason, taskName);
|
||||
}
|
||||
|
||||
});
|
||||
public void setBlocked(IStatus reason) {
|
||||
Dialog.getBlockedHandler().showBlocked(this, reason, taskName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IProgressMonitor#setCanceled
|
||||
*/
|
||||
@Override
|
||||
public void setCanceled(boolean b) {
|
||||
super.setCanceled(b);
|
||||
taskName = null;
|
||||
@@ -202,7 +156,6 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
/**
|
||||
* @see IProgressMonitor#setTaskName
|
||||
*/
|
||||
@Override
|
||||
public void setTaskName(String name) {
|
||||
super.setTaskName(name);
|
||||
taskName = name;
|
||||
@@ -212,7 +165,6 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
/**
|
||||
* @see IProgressMonitor#subTask
|
||||
*/
|
||||
@Override
|
||||
public void subTask(String name) {
|
||||
// Be prepared in case the first task was null
|
||||
if (taskName == null) {
|
||||
@@ -225,7 +177,6 @@ public class CodeGeneratorProgressMonitor extends ProgressMonitorWrapper impleme
|
||||
/**
|
||||
* @see IProgressMonitor#worked
|
||||
*/
|
||||
@Override
|
||||
public void worked(int work) {
|
||||
super.worked(work);
|
||||
runEventLoop();
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.codegen.config;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -40,6 +41,8 @@ public class JetBean {
|
||||
|
||||
private String className = ""; //$NON-NLS-1$
|
||||
|
||||
private Method method = null;
|
||||
|
||||
private String version = null;
|
||||
|
||||
private String language = null;
|
||||
@@ -52,8 +55,6 @@ public class JetBean {
|
||||
|
||||
private long crc = 0;
|
||||
|
||||
private String methodName;
|
||||
|
||||
/**
|
||||
* Getter for crc.
|
||||
*
|
||||
@@ -292,6 +293,24 @@ public class JetBean {
|
||||
this.loader = newloader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for method.
|
||||
*
|
||||
* @return the method
|
||||
*/
|
||||
public Method getMethod() {
|
||||
return this.method;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the method.
|
||||
*
|
||||
* @param method the method to set
|
||||
*/
|
||||
public void setMethod(Method method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for className.
|
||||
*
|
||||
@@ -372,26 +391,4 @@ public class JetBean {
|
||||
this.family = family;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for methodName.
|
||||
*
|
||||
* @return the methodName
|
||||
*/
|
||||
public String getMethodName() {
|
||||
return this.methodName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the methodName.
|
||||
*
|
||||
* @param methodName the methodName to set
|
||||
*/
|
||||
public void setMethodName(String methodName) {
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public String getFullTemplatePath() {
|
||||
return Platform.getPlugin(getJetPluginRepository()).getDescriptor().getInstallURL().toString() + getTemplateRelativeUri();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.io.DataInputStream;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.HashMap;
|
||||
@@ -56,7 +55,7 @@ import org.eclipse.jdt.core.IJavaProject;
|
||||
import org.eclipse.jdt.core.JavaCore;
|
||||
import org.eclipse.jdt.core.JavaModelException;
|
||||
import org.talend.commons.debug.TalendDebugHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.designer.codegen.i18n.Messages;
|
||||
|
||||
/**
|
||||
@@ -79,10 +78,6 @@ public class TalendJetEmitter extends JETEmitter {
|
||||
|
||||
private static Logger log = Logger.getLogger(TalendJetEmitter.class);
|
||||
|
||||
private JetBean jetbean;
|
||||
|
||||
private boolean classAvailable = true;
|
||||
|
||||
/**
|
||||
* DOC mhirt TalendJetEmitter constructor comment.
|
||||
*
|
||||
@@ -101,16 +96,17 @@ public class TalendJetEmitter extends JETEmitter {
|
||||
this.talendEclipseHelper = new TalendEclipseHelper(progressMonitor, this, rebuild);
|
||||
}
|
||||
|
||||
public TalendJetEmitter(JetBean jetbean, TalendEclipseHelper teh) {
|
||||
super(jetbean.getFullTemplatePath(), jetbean.getClassLoader());
|
||||
this.jetbean = jetbean;
|
||||
this.templateName = jetbean.getClassName();
|
||||
this.componentFamily = jetbean.getFamily();
|
||||
this.templateLanguage = jetbean.getLanguage();
|
||||
this.codePart = jetbean.getCodePart();
|
||||
public TalendJetEmitter(String arg0, ClassLoader arg1, String componentFamily, String templateName, String templateLanguage,
|
||||
String codePart, TalendEclipseHelper teh) {
|
||||
super(arg0, arg1);
|
||||
if (templateName.endsWith(codePart + "" + templateLanguage)) { //$NON-NLS-1$
|
||||
this.templateName = templateName.substring(templateName.lastIndexOf(".") + 1, templateName.lastIndexOf(codePart)); //$NON-NLS-1$
|
||||
} else {
|
||||
this.templateName = templateName;
|
||||
}
|
||||
this.componentFamily = componentFamily;
|
||||
this.templateLanguage = templateLanguage;
|
||||
this.codePart = codePart;
|
||||
this.talendEclipseHelper = teh;
|
||||
}
|
||||
|
||||
@@ -186,16 +182,19 @@ public class TalendJetEmitter extends JETEmitter {
|
||||
project.create(new SubProgressMonitor(progressMonitor, 1));
|
||||
progressMonitor.subTask(CodeGenPlugin.getPlugin().getString("_UI_JETCreatingProject_message", //$NON-NLS-1$
|
||||
new Object[] { project.getName() }));
|
||||
}
|
||||
if (!project.isOpen()) {
|
||||
project.open(new SubProgressMonitor(progressMonitor, 5));
|
||||
project.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(progressMonitor, 1));
|
||||
}
|
||||
IProjectDescription description = project.getDescription();
|
||||
// only in case it's one old workspace and got no nature defined.
|
||||
if (!ArrayUtils.contains(description.getNatureIds(), JavaCore.NATURE_ID)) {
|
||||
IProjectDescription description = workspace.newProjectDescription(project.getName());
|
||||
description.setNatureIds(new String[] { JavaCore.NATURE_ID });
|
||||
description.setLocation(null);
|
||||
project.open(new SubProgressMonitor(progressMonitor, 1));
|
||||
project.setDescription(description, new SubProgressMonitor(progressMonitor, 1));
|
||||
} else {
|
||||
project.open(new SubProgressMonitor(progressMonitor, 5));
|
||||
IProjectDescription description = project.getDescription();
|
||||
// only in case it's one old workspace and got no nature defined.
|
||||
if (!ArrayUtils.contains(description.getNatureIds(), JavaCore.NATURE_ID)) {
|
||||
description.setNatureIds(new String[] { JavaCore.NATURE_ID });
|
||||
project.setDescription(description, new SubProgressMonitor(progressMonitor, 1));
|
||||
}
|
||||
}
|
||||
|
||||
javaProject = JavaCore.create(project);
|
||||
@@ -354,10 +353,7 @@ public class TalendJetEmitter extends JETEmitter {
|
||||
// if jetEmitter.getMethod() == null, means the class file doesn't exist anymore
|
||||
// it should be impossible to have only the class file deleted and the .java never modified, but still
|
||||
// handle this case.
|
||||
// we could optimize the speed at this point by removing the method call here.
|
||||
// but since this part is only called when there is a change detected in the jet emitters, it should be
|
||||
// ok.
|
||||
if (needRebuild || jetEmitter.method == null) {
|
||||
if (needRebuild || jetEmitter.getMethod() == null) {
|
||||
subProgressMonitor.subTask(CodeGenPlugin.getPlugin().getString("_UI_JETBuilding_message", //$NON-NLS-1$
|
||||
new Object[] { project.getName() }));
|
||||
|
||||
@@ -378,7 +374,6 @@ public class TalendJetEmitter extends JETEmitter {
|
||||
marker.getAttribute(IMarker.MESSAGE),
|
||||
(CodeGenPlugin.getPlugin().getString("jet.mark.file.line", new Object[] { //$NON-NLS-1$
|
||||
targetFile.getLocation(), marker.getAttribute(IMarker.LINE_NUMBER) }))));
|
||||
classAvailable = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,102 +425,4 @@ public class TalendJetEmitter extends JETEmitter {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.emf.codegen.jet.JETEmitter#getMethod()
|
||||
*/
|
||||
@Override
|
||||
public Method getMethod() {
|
||||
Method localMethod = super.getMethod();
|
||||
if (localMethod == null) {
|
||||
try {
|
||||
localMethod = loadMethod();
|
||||
} catch (Exception e) {
|
||||
// nothing since if got exception here, the method will be reloaded bellow. (normal case)
|
||||
// real error should be logged if the initialize fail.
|
||||
}
|
||||
// add this part in case there is any problem in the project (should never be called in normal use)
|
||||
// but if there is any problem, it will force to regenerate again this component.
|
||||
// This might be also called for custom components.
|
||||
if (localMethod == null) {
|
||||
try {
|
||||
talendEclipseHelper.initialize(BasicMonitor.toMonitor(new NullProgressMonitor()), this, componentFamily,
|
||||
templateName, templateLanguage, codePart);
|
||||
localMethod = super.getMethod();
|
||||
} catch (JETException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
} else {
|
||||
setMethod(localMethod);
|
||||
}
|
||||
}
|
||||
return localMethod;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC mhirt Comment method "loadMethod".
|
||||
*
|
||||
* @param methodName
|
||||
* @return
|
||||
* @throws MalformedURLException
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
private Method loadMethod() throws ClassNotFoundException, MalformedURLException {
|
||||
if (jetbean == null) {
|
||||
return null;
|
||||
}
|
||||
if (currentClassLoader != jetbean.getClassLoader()) {
|
||||
final IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
IProject project = workspace.getRoot().getProject(projectName);
|
||||
|
||||
URL url = new File(project.getLocation() + "/runtime").toURL(); //$NON-NLS-1$
|
||||
currentClassLoader = jetbean.getClassLoader();
|
||||
theClassLoader = new URLClassLoader(new URL[] { url }, jetbean.getClassLoader());
|
||||
}
|
||||
Class theClass;
|
||||
try {
|
||||
theClass = theClassLoader.loadClass(jetbean.getClassName());
|
||||
} catch (Error e) {
|
||||
throw new ClassNotFoundException(e.getMessage(), e);
|
||||
}
|
||||
// TDI-23079
|
||||
try {
|
||||
Method[] methods = theClass.getDeclaredMethods();
|
||||
for (int i = 0; i < methods.length; ++i) {
|
||||
if (methods[i].getName().equals(jetbean.getMethodName())) {
|
||||
return methods[i];
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static ClassLoader currentClassLoader = null;
|
||||
|
||||
private static URLClassLoader theClassLoader = null;
|
||||
|
||||
/**
|
||||
* Getter for classAvailable.
|
||||
*
|
||||
* @return the classAvailable
|
||||
*/
|
||||
public boolean isClassAvailable() {
|
||||
return this.classAvailable;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.emf.codegen.jet.JETEmitter#generate(org.eclipse.emf.common.util.Monitor, java.lang.Object[],
|
||||
* java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String generate(Monitor progressMonitor, Object[] arguments, String lineDelimiter) throws JETException {
|
||||
getMethod(); // force to load the method before generate in case it was not set before.
|
||||
return super.generate(progressMonitor, arguments, lineDelimiter);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,18 +15,17 @@ package org.talend.designer.codegen.model;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
@@ -34,16 +33,16 @@ import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.SubProgressMonitor;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.emf.codegen.CodeGenPlugin;
|
||||
import org.eclipse.emf.codegen.jet.JETEmitter;
|
||||
import org.eclipse.emf.codegen.jet.JETException;
|
||||
import org.eclipse.emf.common.CommonPlugin;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.jdt.core.JavaCore;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.swt.SWTError;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.BusinessException;
|
||||
@@ -98,8 +97,6 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
|
||||
private static String defaultTemplate = null;
|
||||
|
||||
public static final String JET_PROJECT = ".JETEmitters"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Default Constructor. Must not be used.
|
||||
*/
|
||||
@@ -132,11 +129,20 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
TimeMeasure.measureActive = CommonsPlugin.isDebugMode();
|
||||
|
||||
TimeMeasure.begin("initialize Jet Emitters"); //$NON-NLS-1$
|
||||
ComponentsFactoryProvider.saveComponentVisibilityStatus();
|
||||
|
||||
jetFilesCompileFail.clear();
|
||||
|
||||
IProgressMonitor monitorWrap = null;
|
||||
boolean headless = CommonUIPlugin.isFullyHeadless();
|
||||
boolean headless = CommonsPlugin.isHeadless();
|
||||
if (!headless) {
|
||||
try {
|
||||
Display.getDefault();
|
||||
} catch (SWTError e) {
|
||||
headless = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!headless) {
|
||||
monitorWrap = new CodeGeneratorProgressMonitor(delegateMonitor);
|
||||
} else {
|
||||
@@ -144,14 +150,14 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
}
|
||||
ECodeLanguage codeLanguage = LanguageManager.getCurrentLanguage();
|
||||
|
||||
initializeJetEmittersProject(monitorWrap);
|
||||
|
||||
CodeGeneratorInternalTemplatesFactory templatesFactory = CodeGeneratorInternalTemplatesFactoryProvider
|
||||
.getInstance();
|
||||
templatesFactory.setCurrentLanguage(codeLanguage);
|
||||
templatesFactory.init();
|
||||
|
||||
IComponentsFactory componentsFactory = ComponentsFactoryProvider.getInstance();
|
||||
// do not call init because it may be already loaded by
|
||||
// ComponentsFactoryProvider.saveComponentVisibilityStatus
|
||||
componentsFactory.getComponents();
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
@@ -181,9 +187,11 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
if (components != null) {
|
||||
ECodePart codePart = ECodePart.MAIN;
|
||||
for (IComponent component : new ArrayList<IComponent>(components)) {
|
||||
// if (component.isTechnical() || component.isVisible()) {
|
||||
if (component.getAvailableCodeParts().size() > 0) {
|
||||
initComponent(codeLanguage, jetBeans, codePart, component);
|
||||
}
|
||||
// }
|
||||
monitorBuffer++;
|
||||
if (monitorBuffer % 100 == 0) {
|
||||
monitorWrap.worked(100);
|
||||
@@ -230,7 +238,7 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
} finally {
|
||||
try {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
IProject project = workspace.getRoot().getProject(JET_PROJECT);
|
||||
IProject project = workspace.getRoot().getProject(".JETEmitters"); //$NON-NLS-1$
|
||||
project.build(IncrementalProjectBuilder.AUTO_BUILD, null);
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
@@ -257,47 +265,6 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC nrousseau Comment method "initializeJetEmittersProject".
|
||||
*
|
||||
* @throws CoreException
|
||||
*/
|
||||
private void initializeJetEmittersProject(IProgressMonitor progressMonitor) throws CoreException {
|
||||
final IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
|
||||
IProject project = workspace.getRoot().getProject(JET_PROJECT);
|
||||
progressMonitor.subTask(CodeGenPlugin.getPlugin().getString("_UI_JETPreparingProject_message", //$NON-NLS-1$
|
||||
new Object[] { project.getName() }));
|
||||
File file = new File(workspace.getRoot().getLocation().append(JET_PROJECT).toPortableString());
|
||||
if (file.exists() && !project.isAccessible()) {
|
||||
// .metadata missing, so need to reimport project to add it in the metadata.
|
||||
progressMonitor.subTask("Reinitilializing project " + project.getName()); //$NON-NLS-1$
|
||||
project.create(new SubProgressMonitor(progressMonitor, 1));
|
||||
progressMonitor.subTask(CodeGenPlugin.getPlugin().getString("_UI_JETCreatingProject_message", //$NON-NLS-1$
|
||||
new Object[] { project.getName() }));
|
||||
} else if (!project.isAccessible()) {
|
||||
// project was deleted manually on the disk. The delete here will remove infos from metadata
|
||||
// then we'll be able to create a new clean project.
|
||||
project.delete(true, progressMonitor);
|
||||
}
|
||||
if (!project.exists()) {
|
||||
progressMonitor.subTask("JET creating project " + project.getName()); //$NON-NLS-1$
|
||||
project.create(new SubProgressMonitor(progressMonitor, 1));
|
||||
progressMonitor.subTask(CodeGenPlugin.getPlugin().getString("_UI_JETCreatingProject_message", //$NON-NLS-1$
|
||||
new Object[] { project.getName() }));
|
||||
}
|
||||
if (!project.isOpen()) {
|
||||
project.open(new SubProgressMonitor(progressMonitor, 5));
|
||||
project.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(progressMonitor, 1));
|
||||
}
|
||||
IProjectDescription description = project.getDescription();
|
||||
// only in case it's one old workspace and got no nature defined.
|
||||
if (!ArrayUtils.contains(description.getNatureIds(), JavaCore.NATURE_ID)) {
|
||||
description.setNatureIds(new String[] { JavaCore.NATURE_ID });
|
||||
project.setDescription(description, new SubProgressMonitor(progressMonitor, 1));
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
public static Job initialize() {
|
||||
@@ -474,7 +441,10 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
alreadyCompiledEmitters = loadEmfPersistentData(EmfEmittersPersistenceFactory.getInstance(codeLanguage)
|
||||
.loadEmittersPool(), components, monitorWrap);
|
||||
for (JetBean jetBean : alreadyCompiledEmitters) {
|
||||
TalendJetEmitter emitter = new TalendJetEmitter(jetBean, dummyEmitter.getTalendEclipseHelper());
|
||||
TalendJetEmitter emitter = new TalendJetEmitter(getFullTemplatePath(jetBean), jetBean.getClassLoader(),
|
||||
jetBean.getFamily(), jetBean.getClassName(), jetBean.getLanguage(), jetBean.getCodePart(),
|
||||
dummyEmitter.getTalendEclipseHelper());
|
||||
emitter.setMethod(jetBean.getMethod());
|
||||
emitterPool.put(jetBean, emitter);
|
||||
monitorBuffer++;
|
||||
if (monitorBuffer % 100 == 0) {
|
||||
@@ -501,6 +471,11 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
}
|
||||
}
|
||||
|
||||
private static String getFullTemplatePath(JetBean jetBean) {
|
||||
return Platform.getPlugin(jetBean.getJetPluginRepository()).getDescriptor().getInstallURL().toString()
|
||||
+ jetBean.getTemplateRelativeUri();
|
||||
}
|
||||
|
||||
private static void synchronizedComponent(List<JetBean> components, IProgressMonitor sub,
|
||||
List<JetBean> alreadyCompiledEmitters, TalendJetEmitter dummyEmitter, int monitorBuffer, IProgressMonitor monitorWrap) {
|
||||
for (JetBean jetBean : components) {
|
||||
@@ -508,7 +483,9 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
ComponentCompilations.deleteMarkers();
|
||||
|
||||
// System.out.println("The new file is not in JetPersistence* cache:" + getFullTemplatePath(jetBean));
|
||||
TalendJetEmitter emitter = new TalendJetEmitter(jetBean, dummyEmitter.getTalendEclipseHelper());
|
||||
TalendJetEmitter emitter = new TalendJetEmitter(getFullTemplatePath(jetBean), jetBean.getClassLoader(),
|
||||
jetBean.getFamily(), jetBean.getClassName(), jetBean.getLanguage(), jetBean.getCodePart(),
|
||||
dummyEmitter.getTalendEclipseHelper());
|
||||
// wzhang modified to fix bug 11439
|
||||
if (monitorWrap.isCanceled()) {
|
||||
if (!CommonUIPlugin.isFullyHeadless()) {
|
||||
@@ -534,7 +511,9 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (emitter.isClassAvailable()) {
|
||||
if (emitter.getMethod() != null) {
|
||||
jetBean.setMethod(emitter.getMethod());
|
||||
jetBean.setClassName(emitter.getMethod().getDeclaringClass().getName());
|
||||
alreadyCompiledEmitters.add(jetBean);
|
||||
} else {
|
||||
jetFilesCompileFail.add(jetBean);
|
||||
@@ -560,7 +539,7 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
for (JetBean unit : alreadyCompiledEmitters) {
|
||||
// long unitCRC = extractTemplateHashCode(unit);
|
||||
long unitCRC = unit.getCrc();
|
||||
toReturn.add(new LightJetBean(unit.getTemplateRelativeUri(), unit.getClassName(), unit.getMethodName(), unit
|
||||
toReturn.add(new LightJetBean(unit.getTemplateRelativeUri(), unit.getClassName(), unit.getMethod().getName(), unit
|
||||
.getVersion(), unit.getLanguage(), unitCRC));
|
||||
}
|
||||
return toReturn;
|
||||
@@ -582,7 +561,7 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
URL url;
|
||||
try {
|
||||
url = new URL(uri.toString());
|
||||
unitCRC = IOUtils.computeCRC(url.openStream());
|
||||
unitCRC = IOUtils.computeCRConTextFile(url.openStream());
|
||||
} catch (Exception e) {
|
||||
// ignore me even if i'm null
|
||||
}
|
||||
@@ -632,8 +611,15 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
}
|
||||
if (lightBean != null && lightBean.getCrc() == unit.getCrc()) {
|
||||
unit.setClassName(lightBean.getClassName());
|
||||
unit.setMethodName(lightBean.getMethodName());
|
||||
toReturn.add(unit);
|
||||
try {
|
||||
Method method = loadMethod(url, lightBean.getMethodName(), unit);
|
||||
if (method != null) {
|
||||
unit.setMethod(method);
|
||||
toReturn.add(unit);
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
log.info(Messages.getString("CodeGeneratorEmittersPoolFactory.Class.NotFound", unit.getClassName())); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -645,13 +631,50 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC mhirt Comment method "loadMethod".
|
||||
*
|
||||
* @param methodName
|
||||
* @return
|
||||
* @throws MalformedURLException
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
private static Method loadMethod(URL url, String methodName, JetBean unit) throws ClassNotFoundException {
|
||||
if (currentClassLoader != unit.getClassLoader()) {
|
||||
currentClassLoader = unit.getClassLoader();
|
||||
theClassLoader = new URLClassLoader(new URL[] { url }, unit.getClassLoader());
|
||||
}
|
||||
Class theClass;
|
||||
try {
|
||||
theClass = theClassLoader.loadClass(unit.getClassName());
|
||||
} catch (Error e) {
|
||||
throw new ClassNotFoundException(e.getMessage(), e);
|
||||
}
|
||||
// TDI-23079
|
||||
try {
|
||||
Method[] methods = theClass.getDeclaredMethods();
|
||||
for (int i = 0; i < methods.length; ++i) {
|
||||
if (methods[i].getName().equals(methodName)) {
|
||||
return methods[i];
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static ClassLoader currentClassLoader = null;
|
||||
|
||||
private static URLClassLoader theClassLoader = null;
|
||||
|
||||
/**
|
||||
* Getter for emitterPool.
|
||||
*
|
||||
* @return the emitterPool
|
||||
*/
|
||||
public static HashMap<JetBean, JETEmitter> getEmitterPool() {
|
||||
if (emitterPool == null || (!isInitialized() && !isInitializeStart())) {
|
||||
if (!isInitialized() && !isInitializeStart()) {
|
||||
initialize();
|
||||
}
|
||||
return emitterPool;
|
||||
@@ -664,7 +687,7 @@ public final class CodeGeneratorEmittersPoolFactory {
|
||||
* @return
|
||||
*/
|
||||
public static JETEmitter getJETEmitter(JetBean jetBean) {
|
||||
if (emitterPool == null || (!isInitialized() && !isInitializeStart())) {
|
||||
if (!isInitialized() && !isInitializeStart()) {
|
||||
initialize();
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ public final class JetSkeletonManager {
|
||||
String path = file.getAbsolutePath();
|
||||
long currentCRC = 0;
|
||||
try {
|
||||
currentCRC = IOUtils.computeCRC(new FileInputStream(file));
|
||||
currentCRC = IOUtils.computeCRConTextFile(new FileInputStream(file));
|
||||
} catch (FileNotFoundException e) {
|
||||
// ignore here, only print
|
||||
// e.printStackTrace();
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
source.. = src/main/java/
|
||||
output.. = class/
|
||||
bin.includes = META-INF/,\
|
||||
.\
|
||||
,plugin_zh_CN.properties\
|
||||
,plugin_ru.properties\
|
||||
,plugin_en.properties\
|
||||
,plugin_hr.properties\
|
||||
,plugin_fr.properties\
|
||||
,plugin_pt_BR.properties\
|
||||
,plugin_nl.properties\
|
||||
,plugin_el.properties\
|
||||
,plugin_ja.properties\
|
||||
,plugin_it.properties\
|
||||
,plugin_de.properties\
|
||||
,plugin_swtbot.properties
|
||||
.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Exchange=Exchange
|
||||
DownloadComponenentsAction.Label=Download Selected Components
|
||||
RefreshComponenentsAction.Label=Refresh Componenents List
|
||||
providerName=www.example.org
|
||||
pluginName = Exchange Model
|
||||
@@ -4,6 +4,5 @@ MyExtensionsComposite.Version=Verzija
|
||||
MyExtensionsComposite.UpdateOperateStatus=A\u017Euriraj
|
||||
MyExtensionsComposite.DeleteOperateStatus=Obri\u0161i
|
||||
MyExtensionsComposite.Form.Compatibility.Version=Verzija
|
||||
MyExtensionsComposite.Form.Description=Opis
|
||||
ImportExchangeDialog.WARNING=Upozorenje
|
||||
ImportExchangeDialog.REFRESH_BUTTON=Osvje\u017Ei
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
ExchangeView.Exchange=Exchange
|
||||
AvailableExtensionsComposite.ExtensionName=Extension Name
|
||||
AvailableExtensionsComposite.Version=Version
|
||||
AvailableExtensionsComposite.Rating=Rating
|
||||
AvailableExtensionsComposite.Author=Author
|
||||
AvailableExtensionsComposite.FilterTitle=Filter
|
||||
AvailableExtensionsComposite.ViewDetail.installOperateStatus=Install
|
||||
AvailableExtensionsComposite.ViewDetail.WriteReview=Write a review
|
||||
AvailableExtensionsComposite.ViewDetail.InsertionReviewFailure=Insertion Review failure.
|
||||
AvailableExtensionsComposite.ViewDetail.InsertionReviewFailureTip=You should check it.
|
||||
DownloadedExtensionsComposite.ExtensionName=Extension Name
|
||||
DownloadedExtensionsComposite.DownloadedVersion=Downloaded Version
|
||||
DownloadedExtensionsComposite.DownloadDate=Download Date
|
||||
DownloadedExtensionsComposite.OperateStatus=Operate Status
|
||||
DownloadedExtensionsComposite.installOperateStatus=Install
|
||||
DownloadedExtensionsComposite.installedOperateStatus=Installed
|
||||
DownloadedExtensionsComposite.updateOperateStatus=Update
|
||||
MyExtensionsComposite.ExtensionName=Extension Name
|
||||
MyExtensionsComposite.Version=Version
|
||||
MyExtensionsComposite.UploadDate=Upload Date
|
||||
MyExtensionsComposite.AddNewExtensionTitle=Add New Extension
|
||||
MyExtensionsComposite.UpLoadNewVersionOperateStatus=UpLoad New Version
|
||||
MyExtensionsComposite.UpdateOperateStatus=Update
|
||||
MyExtensionsComposite.ModifyOperateStatus=Modify
|
||||
MyExtensionsComposite.DeleteOperateStatus=Delete
|
||||
MyExtensionsComposite.Form.Return=Return
|
||||
MyExtensionsComposite.Form.ExtensionTitle=Extension Title
|
||||
MyExtensionsComposite.Form.InitialVersion=Initial Version
|
||||
MyExtensionsComposite.Form.Compatibility=Compatibility
|
||||
MyExtensionsComposite.Form.Compatibility.AllVersions=All versions
|
||||
MyExtensionsComposite.Form.Compatibility.Version=Version
|
||||
MyExtensionsComposite.Form.Compatibility.AndOlder=and older
|
||||
MyExtensionsComposite.Form.Compatibility.AndNewer=and newer
|
||||
MyExtensionsComposite.Form.Compatibility.AllVersionsExcept=All versions except:
|
||||
MyExtensionsComposite.Form.Compatibility.OnlyTheseVersions=Only these versions:
|
||||
MyExtensionsComposite.Form.Description=Description
|
||||
MyExtensionsComposite.Form.Visibility=Visibility
|
||||
MyExtensionsComposite.Form.Visibility.Public=Public(visible by all)
|
||||
MyExtensionsComposite.Form.Visibility.Private=Private(visible by me)
|
||||
MyExtensionsComposite.Form.Upload=Upload
|
||||
MyExtensionsComposite.Form.Upload.SelectAnItem=Select an item from the currently open project
|
||||
MyExtensionsComposite.Form.Upload.File=File:
|
||||
MyExtensionsComposite.Form.Upload.Browse=Browse
|
||||
MyExtensionsComposite.Form.Upload.Browse.SelectFile=Select a File of the extension to upload
|
||||
MyExtensionsComposite.Form.DeleteExtensionTile=Delete Extension
|
||||
MyExtensionsComposite.Form.DeleteExtensionMessage=You sure delete this Extension
|
||||
MyExtensionsComposite.Form.UploadExtension=Upload Extension
|
||||
MyExtensionsComposite.Form.UpdateExtension=Update Extension
|
||||
MyExtensionsComposite.Form.ModifyExtension=Modify Extension
|
||||
Exchange.logon.error=Exchange user have not been registered, please register using the preferences .
|
||||
RefreshJob.FindExtensions.Title=Finding available extensions
|
||||
RefreshJob.FindExtensions.Message=Finding extensions from exchange...
|
||||
ShowContributedExtensionsJob.ShowContributedExtensions.Title=Finding contributed extensions
|
||||
ShowContributedExtensionsJob.ShowContributedExtensions.Message=Finding contributed extensions from exchange...
|
||||
ShowInstalledExtensionsJob.ShowInstalledExtensions.Title=Finding installed extensions
|
||||
ShowInstalledExtensionsJob.ShowInstalledExtensions.Message=Finding installed extensions from exchange...
|
||||
DeleteExtensionJob.DeleteExtensionJob.Title=Delete an extension...
|
||||
DeleteExtensionJob.DeleteExtensionJob.Message=Delete an extension...
|
||||
DeleteExtensionJob.DeleteFailure=Delete failure.
|
||||
DeleteExtensionJob.DeleteFailureTip=You should check it.
|
||||
ModifyExtensionJob.Title=Modify an extension...
|
||||
ModifyExtensionJob.Message=Modify an extension...
|
||||
ModifyExtensionJob.ModifyFailure=Modify failure.
|
||||
ModifyExtensionJob.ModifyFailureTip=You should check it.
|
||||
InstalledExtensionJob.Title=Installed an extension...
|
||||
InstalledExtensionJob.Message=Installed an extension...
|
||||
InsertionExtensionAction.InstalledFailure=Installed failure.
|
||||
InsertionExtensionAction.InstalledFailureTip=You should check it.
|
||||
UploadRevisionJob.Title=Upload Revision...
|
||||
UploadRevisionJob.Message=Upload Revision...
|
||||
UploadRevisionAction.InstalledFailure=Upload Revision failure.
|
||||
UploadRevisionAction.InstalledFailureTip=You should check it.
|
||||
DownloadComponenentsAction.installExchange=Installed Exchange Components
|
||||
DownloadComponenentsAction.DownloadTaskTitle=Downloading files from Exchange
|
||||
DownloadComponenentsAction.DownloadTaskName=Downloading file from url:
|
||||
DownloadComponenentsAction.ReloadPalette=Reloading palette...
|
||||
DownloadComponenentsAction.DownloadFailure=Download failure.
|
||||
DownloadComponenentsAction.DownloadFailureTip=You must change the Download Settings.
|
||||
ExchangeWebService.insertionExtensionSuccessful=Insertion Extension successful.
|
||||
ExchangeWebService.downloadingExtensionSuccessful=Downloaded Extension successful.
|
||||
ExchangeWebService.deleteExtensionSuccessful=Deleted Extension successful.
|
||||
ExchangeWebService.insertReviewSuccessful=Insertion Review successful.
|
||||
ExchangeWebService.updateRevisionSuccessful=Update Revision successful.
|
||||
ExchangeWebService.insertionRevisionSuccessful=Insertion Revision successful.
|
||||
ImportExchangeDialog.dialogTitle=Select an item from Talend Exchange
|
||||
ImportExchangeDialog.WARNING=WARNING
|
||||
ImportExchangeDialog.NOTSELECTWARNING=Please select one item from table.....
|
||||
ImportExchangeDialog.downloadProgressBar=Download Item,Please Wait\!
|
||||
ImportExchangeDialog.EXTENSION_NAME=Extension Name
|
||||
ImportExchangeDialog.AUTHOR_NAME=Author Name
|
||||
ImportExchangeDialog.LATEST_REVISION=Latest Revision
|
||||
ImportExchangeDialog.EXTENSION_DESCRIPTION=Extension Description
|
||||
ImportExchangeDialog.download.components=Download Components Please Wait\!
|
||||
ImportExchangeDialog.JOB_BUTTON=Job Designs
|
||||
ImportExchangeDialog.DOWNLOAD_JOB=Download Some Job Designs...
|
||||
ImportExchangeDialog.ROUTINES_BUTTON=Routines
|
||||
ImportExchangeDialog.ROUTINES_PROGRESSBAR=Download Some Routines...
|
||||
ImportExchangeDialog.TEMPLATES_BUTTON=SQL Templates
|
||||
ImportExchangeDialog.TEMPLATES_PROGRESSBAR=Download Some SQL Templates...
|
||||
ImportExchangeDialog.REFRESH_BUTTON=Refresh
|
||||
ImportExchangeDialog.REFRESHING_PROGRESSBAR=Refreshing\! Please Wait.....
|
||||
ImportExchangeDialog.NOT_SELECT_BUTTON=Please select a choice first
|
||||
ImportExchangeDialog.OPERATION_CANCELLED=Operation was cancelled
|
||||
@@ -2,4 +2,3 @@ AvailableExtensionsComposite.Version=Versiyon
|
||||
MyExtensionsComposite.Version=Versiyon
|
||||
MyExtensionsComposite.DeleteOperateStatus=Sil
|
||||
MyExtensionsComposite.Form.Compatibility.Version=Versiyon
|
||||
MyExtensionsComposite.Form.Description=Aç\u0131klama
|
||||
|
||||
@@ -80,20 +80,6 @@
|
||||
checkedType = "only"
|
||||
filtervalue = document.getElementById(checkedType).value;
|
||||
}
|
||||
|
||||
<!-- validate the createNewExtension text start-->
|
||||
var labelValidate = document.getElementById("extension_label").value;
|
||||
var lastVersionAvailableValidate = document.getElementById("lastVersionAvailable").value;
|
||||
if(labelValidate==0){
|
||||
alert("Extension Title is empty");
|
||||
}else if(labelValidate=="null"){
|
||||
alert("Extension Title can not be null");
|
||||
}else if(lastVersionAvailableValidate==0){
|
||||
alert("Initial Version is empty");
|
||||
}else if(lastVersionAvailableValidate=="null"){
|
||||
alert("Initial Version can not be null");
|
||||
}
|
||||
<!-- validate the createNewExtension text end-->
|
||||
|
||||
var listVersionCompatibles = "listVersionCompatibles:" + "'" + checkedType + "'";
|
||||
var filter = "filter:" + "'" + filtervalue + "'";
|
||||
@@ -130,15 +116,6 @@
|
||||
checkedType = "only"
|
||||
filtervalue = document.getElementById(checkedType + "_update").value;
|
||||
}
|
||||
|
||||
<!-- validate the updateExtension text start-->
|
||||
var lastVersionAvailable_updateValidate = document.getElementById("lastVersionAvailable_update").value;
|
||||
if(lastVersionAvailable_updateValidate==0){
|
||||
alert("New Version is empty");
|
||||
}else if(lastVersionAvailable_updateValidate=="null"){
|
||||
alert("New Version can not be null");
|
||||
}
|
||||
<!-- validate the updateExtension text end-->
|
||||
|
||||
var listVersionCompatibles = "listVersionCompatibles:" + "'" + checkedType + "'";
|
||||
var filter = "filter:" + "'" + filtervalue + "'";
|
||||
|
||||
@@ -115,6 +115,7 @@ ImportExchangeDialog.TEMPLATES_BUTTON=SQL Templates
|
||||
ImportExchangeDialog.TEMPLATES_PROGRESSBAR=Download Some SQL Templates...
|
||||
ImportExchangeDialog.REFRESH_BUTTON=Refresh
|
||||
ImportExchangeDialog.REFRESHING_PROGRESSBAR=Refreshing\! Please Wait.....
|
||||
ImportExchangeDialog.WARNING=WARNING
|
||||
ImportExchangeDialog.NOT_SELECT_BUTTON=Please select a choice first
|
||||
ImportExchangeDialog.OPERATION_CANCELLED=Operation was cancelled
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.talend.core.model.general.IExchangeService;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.designer.components.exchange.i18n.Messages;
|
||||
import org.talend.designer.components.exchange.ui.views.ExchangeEditorInput;
|
||||
import org.talend.designer.components.exchange.util.ExchangeUtils;
|
||||
import org.talend.designer.components.exchange.util.ExchangeWebService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
|
||||
@@ -81,7 +82,7 @@ public class ExchangeService implements IExchangeService {
|
||||
JSONObject tokenMessage = new JSONObject();
|
||||
try {
|
||||
tokenMessage.put("username", username);
|
||||
tokenMessage.put("passwordHash", password);
|
||||
tokenMessage.put("passwordHash", ExchangeUtils.getPasswordHash(password));
|
||||
JSONObject token = new us.monoid.json.JSONObject();
|
||||
token.put("contributedExtension", tokenMessage);
|
||||
|
||||
|
||||
@@ -162,14 +162,6 @@ public class AvailableCompositeProvider implements IIntroXHTMLContentProvider {
|
||||
if (fAvailableExtensions != null) {
|
||||
for (int i = 0; i < fAvailableExtensions.size(); i++) {
|
||||
ComponentExtension extension = fAvailableExtensions.get(i);
|
||||
// hide null entries directly
|
||||
if (extension.getLabel().equals("null")) {
|
||||
continue;
|
||||
}
|
||||
// set 0.1 as a default version
|
||||
if (extension.getVersionExtension().equals("") || extension.getVersionExtension().equals("null")) {
|
||||
extension.setVersionExtension("0.1");
|
||||
}
|
||||
Element trExtension = dom.createElement("tr");
|
||||
|
||||
Element tdExtension = dom.createElement("td");
|
||||
|
||||
@@ -165,14 +165,7 @@ public class DownloadExtensionProvider implements IIntroXHTMLContentProvider {
|
||||
while (ite.hasNext()) {
|
||||
count++;
|
||||
ComponentExtension object = (ComponentExtension) ite.next();
|
||||
// hide null entries directly
|
||||
if (object.getLabel().equals("null")) {
|
||||
continue;
|
||||
}
|
||||
// set 0.1 as a default version
|
||||
if (object.getDownloadedVersion().equals("") || object.getDownloadedVersion().equals("null")) {
|
||||
object.setDownloadedVersion("0.1");
|
||||
}
|
||||
|
||||
Element trExtension = dom.createElement("tr");
|
||||
|
||||
Element tdExtension = dom.createElement("td");
|
||||
@@ -196,7 +189,6 @@ public class DownloadExtensionProvider implements IIntroXHTMLContentProvider {
|
||||
style = style + ";background:#F7F7F7";
|
||||
}
|
||||
tdExtension.setAttribute("style", style);
|
||||
// set 0.1 as a default version
|
||||
tdExtension.appendChild(dom.createTextNode(object.getDownloadedVersion()));
|
||||
trExtension.appendChild(tdExtension);
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ import org.talend.commons.emf.EmfHelper;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.StringUtils;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.commons.utils.io.SHA1Util;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.language.LanguageManager;
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
@@ -327,7 +328,22 @@ public class ExchangeUtils {
|
||||
|
||||
public static String getPasswordHash() {
|
||||
Project proj = ProjectManager.getInstance().getCurrentProject();
|
||||
return proj.getExchangeUser().getPassword();
|
||||
String passwordTemp = proj.getExchangeUser().getPassword();
|
||||
try {
|
||||
passwordTemp = SHA1Util.hex_sha1(passwordTemp);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return passwordTemp;
|
||||
}
|
||||
|
||||
public static String getPasswordHash(String passwordTemp) {
|
||||
try {
|
||||
return SHA1Util.hex_sha1(passwordTemp);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return passwordTemp;
|
||||
}
|
||||
|
||||
public static String getUserName() {
|
||||
|
||||
@@ -527,7 +527,7 @@ public class ExchangeWebService {
|
||||
tokenMessage.put("versionCompatibles", listVersionCompatibles);
|
||||
tokenMessage.put("filename", new Path(filename).lastSegment());
|
||||
tokenMessage.put("content", asHex(fileBytes));
|
||||
tokenMessage.put("description", description.replace(" ", "%20"));
|
||||
tokenMessage.put("description", description);
|
||||
tokenMessage.put("agreement", agreement);
|
||||
JSONObject token = new us.monoid.json.JSONObject();
|
||||
token.put("newRevision", tokenMessage);
|
||||
@@ -576,7 +576,7 @@ public class ExchangeWebService {
|
||||
tokenMessage.put("typeExtension", typeExtension);
|
||||
tokenMessage.put("version", version);
|
||||
tokenMessage.put("listVersionCompatibles", listVersionCompatibles);
|
||||
tokenMessage.put("description", description.replace(" ", "%20"));
|
||||
tokenMessage.put("description", description);
|
||||
tokenMessage.put("agreement", agreement);
|
||||
JSONObject token = new us.monoid.json.JSONObject();
|
||||
token.put("revision", tokenMessage);
|
||||
|
||||
@@ -88,61 +88,30 @@ public class SAXLooper {
|
||||
}
|
||||
|
||||
private void judegeMultiIsSimple() {
|
||||
isSimpleParse = isSimplePath(rootPath);
|
||||
|
||||
for(String path : arrOrigLoopPath) {
|
||||
if(!isSimpleParse) {
|
||||
if (this.rootPath.indexOf("..") >= 0 || this.rootPath.indexOf("*") >= 0) {
|
||||
this.isSimpleParse = false;
|
||||
}
|
||||
for (int i = 0; isSimpleParse && i < arrOrigLoopPath.length; i++) {
|
||||
if (arrOrigLoopPath[i].indexOf("..") >= 0 || arrOrigLoopPath[i].indexOf("*") >= 0) {
|
||||
this.isSimpleParse = false;
|
||||
break;
|
||||
}
|
||||
isSimpleParse = isSimplePath(path);
|
||||
}
|
||||
|
||||
for(String[] arrNodePath : arrNodePaths) {
|
||||
for(String path : arrNodePath) {
|
||||
if(!isSimpleParse) {
|
||||
for (int i = 0; isSimpleParse && i < arrNodePaths.length; i++) {
|
||||
for (int j = 0; j < arrNodePaths[i].length; j++) {
|
||||
if (arrNodePaths[i][j].indexOf("..") >= 0 || arrNodePaths[i][j].indexOf("*") >= 0) {
|
||||
this.isSimpleParse = false;
|
||||
break;
|
||||
}
|
||||
isSimpleParse = isSimplePath(path);
|
||||
}
|
||||
if(!isSimpleParse) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.isSimpleParse = false;
|
||||
if (this.isSimpleParse) {
|
||||
looper = new SimpleSAXLooper(rootPath, arrOrigLoopPath, arrNodePaths);
|
||||
} else {
|
||||
looper = new ComplexSAXLooper(rootPath, arrOrigLoopPath, arrNodePaths);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ../../../@attr also can read like a stream(now only consider the case)
|
||||
* @param path
|
||||
* @return
|
||||
*/
|
||||
private boolean isSimplePath(String path) {
|
||||
if(path == null || !path.contains("..") && !path.contains("*")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean isSimplePath = true;
|
||||
|
||||
String[] nodes = path.split("/");
|
||||
|
||||
for(int i = 0;i<nodes.length;i++) {
|
||||
String node = nodes[i];
|
||||
|
||||
if(i < (nodes.length - 1)) {
|
||||
isSimplePath = isSimplePath && "..".equals(node);
|
||||
} else {
|
||||
isSimplePath = isSimplePath && node.startsWith("@");
|
||||
}
|
||||
}
|
||||
|
||||
return isSimplePath;
|
||||
|
||||
}
|
||||
|
||||
private String charset = "UTF-8";
|
||||
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.xml.sax.simpleparser;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DOC Administrator class global comment. Detailled comment
|
||||
*/
|
||||
public class DataBufferCache2 {
|
||||
|
||||
// private static DataBufferCache instance = new DataBufferCache();
|
||||
|
||||
private long bufferSize = 5000;
|
||||
|
||||
private boolean isEnd = false;
|
||||
|
||||
private int bufferNum = 10;
|
||||
|
||||
private LinkedList<Buffer> buffers = new LinkedList<Buffer>();
|
||||
|
||||
private Buffer currentReadBuff = null;
|
||||
|
||||
private Buffer currentWriteBuff = null;
|
||||
|
||||
private DataBufferCache2() {
|
||||
}
|
||||
|
||||
public static DataBufferCache2 getInstance() {
|
||||
return new DataBufferCache2();
|
||||
}
|
||||
|
||||
public void setIsEnd() {
|
||||
synchronized (buffers) {
|
||||
try {
|
||||
if (!isEnd && currentWriteBuff != null) {
|
||||
buffers.add(currentWriteBuff);
|
||||
}
|
||||
this.isEnd = true;
|
||||
} finally {
|
||||
this.buffers.notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setBufferNum(int num) {
|
||||
if (num <= 0)
|
||||
return;
|
||||
this.bufferNum = num;
|
||||
}
|
||||
|
||||
public void setBufferSize(long size) {
|
||||
if (size <= 0)
|
||||
return;
|
||||
this.bufferSize = size;
|
||||
}
|
||||
|
||||
public boolean hasData() {
|
||||
getCurrReadBuffer();
|
||||
if (currentReadBuff == null) {
|
||||
return false;
|
||||
}
|
||||
return this.currentReadBuff.hasNext();
|
||||
}
|
||||
|
||||
public Map<String,Map<String,String>> readData() {
|
||||
return this.currentReadBuff.Next();
|
||||
}
|
||||
|
||||
private void getCurrReadBuffer() {
|
||||
if (currentReadBuff != null && currentReadBuff.hasNext())
|
||||
return;
|
||||
synchronized (this.buffers) {
|
||||
try {
|
||||
while (!this.isEnd && buffers.size() < 1) {
|
||||
try {
|
||||
buffers.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
System.err.println(ex.getMessage());
|
||||
}
|
||||
}
|
||||
if (buffers.size() > 0) {
|
||||
currentReadBuff = buffers.remove();
|
||||
}
|
||||
} finally {
|
||||
this.buffers.notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void writeData(Map<String,Map<String,String>> map) {
|
||||
if (currentWriteBuff == null) {
|
||||
currentWriteBuff = new Buffer();
|
||||
}
|
||||
if (currentWriteBuff.size() < this.bufferSize) {
|
||||
currentWriteBuff.add(map);
|
||||
} else {
|
||||
currentWriteBuff.add(map);
|
||||
synchronized (buffers) {
|
||||
try {
|
||||
while (buffers.size() > bufferNum) {
|
||||
try {
|
||||
buffers.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
System.err.println(ex.getMessage());
|
||||
}
|
||||
}
|
||||
if (currentWriteBuff.size() > 0) {
|
||||
this.buffers.add(currentWriteBuff);
|
||||
}
|
||||
currentWriteBuff = null;
|
||||
} finally {
|
||||
this.buffers.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void notifyErrorOccurred() {
|
||||
setIsEnd();
|
||||
}
|
||||
|
||||
class Buffer {
|
||||
|
||||
private LinkedList<Map<String,Map<String,String>>> buffer = null;
|
||||
|
||||
private boolean isForRead = false; // false for write, true for read
|
||||
|
||||
public Buffer() {
|
||||
buffer = createNewBuffer();
|
||||
}
|
||||
|
||||
public void setIsForRead(boolean isForRead) {
|
||||
this.isForRead = isForRead;
|
||||
}
|
||||
|
||||
public boolean isForRead() {
|
||||
return this.isForRead;
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
return buffer.size() > 0;
|
||||
}
|
||||
|
||||
public Map<String,Map<String,String>> Next() {
|
||||
return buffer.remove();
|
||||
}
|
||||
|
||||
public void add(Map<String,Map<String,String>> o) {
|
||||
this.buffer.add(o);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return this.buffer.size();
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
this.buffer.clear();
|
||||
buffer = null;
|
||||
}
|
||||
|
||||
private LinkedList<Map<String,Map<String,String>>> createNewBuffer() {
|
||||
return new LinkedList<Map<String,Map<String,String>>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.xml.sax.simpleparser;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DOC Administrator class global comment. Detailled comment
|
||||
*/
|
||||
public class DataCache {
|
||||
|
||||
private LinkedList<Map<String, String>> cache = new LinkedList<Map<String, String>>();
|
||||
|
||||
private boolean isReadEnd = false;
|
||||
|
||||
private static DataCache instance = new DataCache();
|
||||
|
||||
private long bufferSize = 10000;
|
||||
|
||||
int startIndex = 0;
|
||||
|
||||
private DataCache() {
|
||||
}
|
||||
|
||||
public static DataCache getInstance() {
|
||||
if (instance == null)
|
||||
instance = new DataCache();
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void setBufferSize(long size) {
|
||||
this.bufferSize = size;
|
||||
}
|
||||
|
||||
public boolean isReadEnd() {
|
||||
return isReadEnd;
|
||||
}
|
||||
|
||||
public boolean hasData() {
|
||||
|
||||
return !(this.isReadEnd && this.cache.size() <= 0);
|
||||
}
|
||||
|
||||
public void setReadEnd(boolean isEnd) {
|
||||
synchronized (this.cache) {
|
||||
this.isReadEnd = isEnd;
|
||||
this.cache.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, String> readData() {
|
||||
Map<String, String> result = null;
|
||||
synchronized (this.cache) {
|
||||
if (!isReadEnd && this.cache.size() <= 0) {
|
||||
try {
|
||||
this.cache.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
System.err.println(ex.getMessage());
|
||||
}
|
||||
}
|
||||
if (cache.size() > 0)
|
||||
result = this.cache.remove();
|
||||
this.cache.notifyAll();
|
||||
// System.out.println(result.get("@swid") + "#" + result.get("@login_date") + "#");
|
||||
return result;
|
||||
}
|
||||
|
||||
// if (cache.size() > 0) {
|
||||
// result = cache.remove();
|
||||
// if (this.isWriteWait) {
|
||||
// synchronized (this) {
|
||||
// this.notifyAll();
|
||||
// }
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// while (!isReadEnd && cache.isEmpty()) {
|
||||
// synchronized (this) {
|
||||
// try {
|
||||
// this.isReadWait = true;
|
||||
// this.wait();
|
||||
// result = cache.remove();
|
||||
// this.isReadWait = false;
|
||||
// this.notifyAll();
|
||||
// return result;
|
||||
// } catch (Exception ex) {
|
||||
// System.err.println(ex.getMessage());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return result;
|
||||
}
|
||||
|
||||
public void writeData(Map<String, String> map) {
|
||||
synchronized (this.cache) {
|
||||
if (this.cache.size() >= bufferSize) {
|
||||
try {
|
||||
this.cache.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
System.err.println(ex.getMessage());
|
||||
}
|
||||
}
|
||||
this.cache.add(map);
|
||||
this.cache.notifyAll();
|
||||
}
|
||||
// if (this.cache.size() < this.bufferSize) {
|
||||
// cache.add(map);
|
||||
// if (this.isReadWait) {
|
||||
// synchronized (this) {
|
||||
// this.notifyAll();
|
||||
// }
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
// while (this.cache.size() >= this.bufferSize) {
|
||||
// synchronized (this) {
|
||||
// try {
|
||||
// this.isReadWait = true;
|
||||
// this.wait();
|
||||
// } catch (Exception ex) {
|
||||
// System.err.println(ex.getMessage());
|
||||
// }
|
||||
// cache.add(map);
|
||||
//
|
||||
// isWriteWait = false;
|
||||
//
|
||||
// this.notifyAll();
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -37,20 +37,12 @@ public class SimpleSAXLoopHandler extends DefaultHandler2 {
|
||||
|
||||
private boolean stop = false;
|
||||
|
||||
private DataBufferCache2 multiCache;
|
||||
|
||||
public SimpleSAXLoopHandler(XMLNodes nodes, DataBufferCache bcache) {
|
||||
super();
|
||||
this.nodes = nodes;
|
||||
this.bufferCache = bcache;
|
||||
}
|
||||
|
||||
public SimpleSAXLoopHandler(XMLNodes nodes, DataBufferCache2 multiCache) {
|
||||
super();
|
||||
this.nodes = nodes;
|
||||
this.multiCache = multiCache;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -66,11 +58,8 @@ public class SimpleSAXLoopHandler extends DefaultHandler2 {
|
||||
* @see org.xml.sax.helpers.DefaultHandler#endDocument()
|
||||
*/
|
||||
public void endDocument() throws SAXException {
|
||||
if(multiCache!=null) {
|
||||
multiCache.setIsEnd();
|
||||
} else {
|
||||
bufferCache.setIsEnd();
|
||||
}
|
||||
// DataCache.getInstance().setReadEnd(true);
|
||||
bufferCache.setIsEnd();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -124,18 +113,6 @@ public class SimpleSAXLoopHandler extends DefaultHandler2 {
|
||||
}
|
||||
|
||||
}
|
||||
} else {//process the attribute out of the loop
|
||||
int index = node.nodePath.lastIndexOf("@");
|
||||
if (index > 0) {
|
||||
if (currentPath.equals(node.nodePath.substring(0, index - 1))) {
|
||||
String attribute = attributes.getValue(node.nodePath.substring(index + 1));
|
||||
if (attribute != null) {
|
||||
node.addTextValue(attribute);
|
||||
} else {
|
||||
node.addTextValue("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,14 +173,12 @@ public class SimpleSAXLoopHandler extends DefaultHandler2 {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
for (XMLNode node : nodes.getNodesCollection()) {
|
||||
map.put(node.originPath, node.getTextValue());
|
||||
// ---------------------------------------------
|
||||
|
||||
// System.out.print("" + node.getTextValue() + "#");
|
||||
// ---------------------------------------------
|
||||
}
|
||||
if(multiCache!=null) {
|
||||
HashMap<String, Map<String, String>> row = new HashMap<String, Map<String, String>>(1);
|
||||
row.put(nodes.getOriginalLoopPath(), map);
|
||||
multiCache.writeData(row);
|
||||
} else {
|
||||
bufferCache.writeData(map);
|
||||
}
|
||||
bufferCache.writeData(map);
|
||||
|
||||
if (stop) {
|
||||
throw new EnoughDataException("Get enough data,now stop the xml parse action");
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
package org.talend.xml.sax.simpleparser;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.FutureTask;
|
||||
@@ -23,7 +21,6 @@ import java.util.concurrent.FutureTask;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
|
||||
import org.talend.xml.sax.SAXLoopCompositeHandler;
|
||||
import org.talend.xml.sax.commons.ISAXLooper;
|
||||
import org.talend.xml.sax.io.UnicodeReader;
|
||||
import org.talend.xml.sax.simpleparser.model.XMLNode;
|
||||
@@ -38,8 +35,6 @@ public class SimpleSAXLooper implements ISAXLooper,Callable {
|
||||
private XMLNodes nodes = new XMLNodes();
|
||||
|
||||
private DataBufferCache bcache;
|
||||
|
||||
private DataBufferCache2 multiCache;
|
||||
|
||||
private Thread task;
|
||||
|
||||
@@ -49,14 +44,6 @@ public class SimpleSAXLooper implements ISAXLooper,Callable {
|
||||
|
||||
SimpleSAXLoopHandler hd = null;
|
||||
|
||||
private String[] arrOrigLoopPath;
|
||||
|
||||
private String rootPath;
|
||||
|
||||
private String[] arrLoopPath;
|
||||
|
||||
private List<XMLNodes> nodesList = new ArrayList<XMLNodes>();
|
||||
|
||||
public SimpleSAXLooper(String loopPath, String[] nodePaths, boolean[] asXMLs) {
|
||||
futureTask = new FutureTask(this);
|
||||
task = new Thread(futureTask);
|
||||
@@ -67,53 +54,7 @@ public class SimpleSAXLooper implements ISAXLooper,Callable {
|
||||
}
|
||||
|
||||
public SimpleSAXLooper(String rootPath, String[] arrLoopPath, String[][] arrNodePaths) {
|
||||
futureTask = new FutureTask(this);
|
||||
task = new Thread(futureTask);
|
||||
|
||||
this.arrOrigLoopPath = arrLoopPath;
|
||||
|
||||
String tmpRootPath = rootPath;
|
||||
if (tmpRootPath.endsWith("/")) {
|
||||
tmpRootPath = tmpRootPath.substring(0, tmpRootPath.length() - 1);
|
||||
}
|
||||
|
||||
this.rootPath = tmpRootPath;
|
||||
|
||||
this.arrLoopPath = getLoopPaths(arrLoopPath);
|
||||
|
||||
for(int j = 0;j<arrNodePaths.length;j++) {
|
||||
String[] nodePaths = arrNodePaths[j];
|
||||
XMLNodes ns = new XMLNodes();
|
||||
for (int i = 0; i < nodePaths.length; i++) {
|
||||
ns.addNode(new XMLNode(this.arrOrigLoopPath[j], this.arrLoopPath[j],nodePaths[i], null));
|
||||
}
|
||||
nodesList.add(ns);
|
||||
}
|
||||
|
||||
initLoopEntries();
|
||||
}
|
||||
|
||||
private String[] getLoopPaths(String[] arrLoops) {
|
||||
|
||||
String[] loopPaths = new String[arrLoops.length];
|
||||
|
||||
for (int i = 0; i < arrLoops.length; i++) {
|
||||
String column = arrLoops[i];
|
||||
String resultCol = this.rootPath;
|
||||
String[] splits = column.split("/");
|
||||
for (String tmp : splits) {
|
||||
if (tmp.equals("..")) {
|
||||
resultCol = resultCol.substring(0, resultCol.lastIndexOf("/"));
|
||||
} else if (tmp.equals(".")) {
|
||||
} else if (!("").equals(tmp)) {
|
||||
resultCol += "/" + tmp;
|
||||
}
|
||||
}
|
||||
|
||||
loopPaths[i] = resultCol;
|
||||
}
|
||||
|
||||
return loopPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,30 +87,7 @@ public class SimpleSAXLooper implements ISAXLooper,Callable {
|
||||
}
|
||||
|
||||
private void initLoopEntries() {
|
||||
|
||||
multiCache = DataBufferCache2.getInstance();
|
||||
|
||||
for(XMLNodes ns : nodesList) {
|
||||
|
||||
for (XMLNode node : ns.getNodes().values()) {
|
||||
String column = node.originPath;
|
||||
String resultCol = node.loopPath;
|
||||
String[] splits = column.split("/");
|
||||
for (String tmp : splits) {
|
||||
if (tmp.equals("..")) {
|
||||
resultCol = resultCol.substring(0, resultCol.lastIndexOf("/"));
|
||||
node.setAttrOutOfLoop(true);
|
||||
} else if (tmp.equals(".")) {
|
||||
node.isDot = true;
|
||||
} else {
|
||||
resultCol += "/" + tmp;
|
||||
}
|
||||
}
|
||||
|
||||
node.nodePath = resultCol;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,19 +118,7 @@ public class SimpleSAXLooper implements ISAXLooper,Callable {
|
||||
public Object call() throws Exception {
|
||||
Reader reader = null;
|
||||
try {
|
||||
DefaultHandler handler = null;
|
||||
if(nodesList.size() > 0) {
|
||||
SAXLoopCompositeHandler chd = new SAXLoopCompositeHandler();
|
||||
for(int i=0;i<nodesList.size();i++) {
|
||||
XMLNodes ns = nodesList.get(i);
|
||||
chd.register(new SimpleSAXLoopHandler(ns, multiCache));
|
||||
}
|
||||
handler = chd;
|
||||
} else {
|
||||
hd = new SimpleSAXLoopHandler(nodes, bcache);
|
||||
handler = hd;
|
||||
}
|
||||
|
||||
hd = new SimpleSAXLoopHandler(nodes, bcache);
|
||||
SAXParser saxParser = null;
|
||||
if(!ignoreDTD) { //orginal code
|
||||
saxParser = SAXParserFactory.newInstance().newSAXParser();
|
||||
@@ -221,16 +127,16 @@ public class SimpleSAXLooper implements ISAXLooper,Callable {
|
||||
spf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
|
||||
saxParser = spf.newSAXParser();
|
||||
}
|
||||
saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
|
||||
saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", hd);
|
||||
if (fileURL != null) {
|
||||
// routines.system.UnicodeReader.java is used to ignore the BOM of the source file.
|
||||
reader = new UnicodeReader(new java.io.FileInputStream(fileURL),this.charset);
|
||||
org.xml.sax.InputSource inSource = new org.xml.sax.InputSource(reader);
|
||||
saxParser.parse(inSource, handler);
|
||||
saxParser.parse(inSource, hd);
|
||||
} else {
|
||||
reader = new UnicodeReader(is,this.charset);
|
||||
org.xml.sax.InputSource inSource = new org.xml.sax.InputSource(reader);
|
||||
saxParser.parse(inSource, handler);
|
||||
saxParser.parse(inSource, hd);
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
@@ -238,13 +144,7 @@ public class SimpleSAXLooper implements ISAXLooper,Callable {
|
||||
reader.close();
|
||||
}
|
||||
} finally {
|
||||
if(multiCache!=null) {
|
||||
multiCache.notifyErrorOccurred();
|
||||
}
|
||||
if(bcache!=null) {
|
||||
bcache.notifyErrorOccurred();
|
||||
}
|
||||
|
||||
bcache.notifyErrorOccurred();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -304,7 +204,8 @@ public class SimpleSAXLooper implements ISAXLooper,Callable {
|
||||
* @see org.talend.xml.sax.commons.ISAXLooper#multiIterator()
|
||||
*/
|
||||
public Iterator<Map<String, Map<String, String>>> multiIterator() {
|
||||
return new SimpleSAXMultiLoopIterator(multiCache);
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setIgnoreDTD(boolean ignoreDTD) {
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package org.talend.xml.sax.simpleparser;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
public class SimpleSAXMultiLoopIterator implements Iterator<Map<String, Map<String, String>>> {
|
||||
|
||||
private DataBufferCache2 cache;
|
||||
|
||||
public SimpleSAXMultiLoopIterator(DataBufferCache2 bcache) {
|
||||
this.cache = bcache;
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
return cache.hasData();
|
||||
}
|
||||
|
||||
public Map<String,Map<String, String>> next() {
|
||||
return cache.readData();
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,8 +23,6 @@ public class XMLNode {
|
||||
|
||||
public boolean outputText = false;
|
||||
|
||||
public String originLoopPath;
|
||||
|
||||
public String loopPath;
|
||||
|
||||
public String nodePath;
|
||||
@@ -34,14 +32,6 @@ public class XMLNode {
|
||||
public boolean isAsXML = false;
|
||||
|
||||
public boolean isDot = false;
|
||||
|
||||
private boolean isAttrOutOfLoop = false;
|
||||
|
||||
private String attrValueOutOfLoop = "";
|
||||
|
||||
public void setAttrOutOfLoop(boolean isAttrOutOfLoop) {
|
||||
this.isAttrOutOfLoop = isAttrOutOfLoop;
|
||||
}
|
||||
|
||||
private StringBuffer value = new StringBuffer();
|
||||
private boolean isNullValue = true;
|
||||
@@ -61,18 +51,8 @@ public class XMLNode {
|
||||
public XMLNode(String loopPath, String originPath, String nodePath) {
|
||||
this(loopPath, originPath, nodePath, false, false);
|
||||
}
|
||||
|
||||
public XMLNode(String originLoopPath,String loopPath, String originPath, String nodePath) {
|
||||
this(loopPath, originPath, nodePath, false, false);
|
||||
this.originLoopPath = originLoopPath;
|
||||
}
|
||||
|
||||
public void addTextValue(String appendValue) {
|
||||
if(isAttrOutOfLoop) {
|
||||
attrValueOutOfLoop = appendValue;
|
||||
return;
|
||||
}
|
||||
|
||||
isNullValue = false;
|
||||
|
||||
if (appendValue != null) {
|
||||
@@ -81,19 +61,11 @@ public class XMLNode {
|
||||
}
|
||||
|
||||
public String getTextValue() {
|
||||
if(isAttrOutOfLoop) {
|
||||
return attrValueOutOfLoop;
|
||||
}
|
||||
|
||||
if(isNullValue) return null;
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
public void resetValue() {
|
||||
if(isAttrOutOfLoop) {
|
||||
return;
|
||||
}
|
||||
|
||||
isNullValue = true;
|
||||
value.setLength(0);
|
||||
}
|
||||
|
||||
@@ -24,9 +24,7 @@ public class XMLNodes {
|
||||
private Map<String, XMLNode> nodes = new HashMap<String, XMLNode>();
|
||||
|
||||
private String loopPath = null;
|
||||
|
||||
private String originLoopPath = null;
|
||||
|
||||
|
||||
public void addNode(XMLNode node) {
|
||||
if (node != null) {
|
||||
nodes.put(node.originPath, node);
|
||||
@@ -74,22 +72,4 @@ public class XMLNodes {
|
||||
return nodes.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC talend2 Comment method "getOriginalLoopPath".
|
||||
* @return
|
||||
*/
|
||||
public String getOriginalLoopPath() {
|
||||
if (this.originLoopPath != null)
|
||||
return this.originLoopPath;
|
||||
|
||||
for (XMLNode node : nodes.values()) {
|
||||
if (node.originLoopPath != null) {
|
||||
this.originLoopPath = node.originLoopPath;
|
||||
return node.originLoopPath;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public class BulkloadClient {
|
||||
try {
|
||||
synchronized (startedBulkloadCount) {
|
||||
while (startedBulkloadCount.get() > 0) {
|
||||
System.out.println(startedBulkloadCount.get() + " remaining.");
|
||||
startedBulkloadCount.wait();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2006-2012 Talend Inc. - www.talend.com
|
||||
* Copyright (C) 2006-2013 Talend Inc. - www.talend.com
|
||||
*
|
||||
* This source code is available under agreement available at
|
||||
* %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
@@ -14,8 +14,7 @@ package org.talend.mdm.bulkload.client;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -26,60 +25,20 @@ public class InputStreamMerger extends InputStream {
|
||||
|
||||
private static final Logger log = Logger.getLogger(InputStreamMerger.class.getName());
|
||||
|
||||
private static final int DEFAULT_CAPACITY = 1000;
|
||||
private final Queue<InputStream> inputStreamBuffer = new ConcurrentLinkedQueue<InputStream>();
|
||||
|
||||
private final Queue<InputStream> inputStreamBuffer;
|
||||
|
||||
private final Object consumerMonitor = new Object();
|
||||
|
||||
private final Object producerMonitor = new Object();
|
||||
private final Object readLock = new Object();
|
||||
|
||||
private final Object exhaustLock = new Object();
|
||||
|
||||
private final AtomicBoolean hasFinishedRead = new AtomicBoolean();
|
||||
|
||||
private WarmUpStrategy warmUpStrategy;
|
||||
|
||||
private boolean isClosed;
|
||||
|
||||
private InputStream currentStream;
|
||||
|
||||
private boolean hasFinishedRead;
|
||||
|
||||
private Throwable lastFailure;
|
||||
|
||||
public InputStreamMerger() {
|
||||
this(DEFAULT_CAPACITY, NoWarmUpStrategy.INSTANCE);
|
||||
}
|
||||
|
||||
public InputStreamMerger(int capacity) {
|
||||
this(capacity, NoWarmUpStrategy.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a input stream merger with custom values.
|
||||
*
|
||||
* @param capacity Input stream buffer will never exceed <code>capacity</code>. {@link Integer#MAX_VALUE} is equivalent
|
||||
* to infinite capacity.
|
||||
* @param strategy Allow customization of "warm up" time. Can allow initial buffering before consumers can actually
|
||||
* consume data.
|
||||
* @see NoWarmUpStrategy
|
||||
* @see ThresholdWarmUpStrategy
|
||||
*/
|
||||
public InputStreamMerger(int capacity, WarmUpStrategy strategy) {
|
||||
if (capacity <= 0) {
|
||||
throw new IllegalArgumentException("Capacity " + capacity + " is invalid.");
|
||||
}
|
||||
inputStreamBuffer = new LinkedBlockingQueue<InputStream>(capacity);
|
||||
warmUpStrategy = strategy;
|
||||
}
|
||||
|
||||
/**
|
||||
* "Push" new content to consumers: publish to this input stream readers new content to be read from <code>inputStream</code>
|
||||
* parameter. This
|
||||
* @param inputStream New content for producers
|
||||
* @throws IOException If this input stream was closed.
|
||||
* @throws IllegalArgumentException If <code>inputStream</code> is <code>null</code>.
|
||||
* @see #close()
|
||||
*/
|
||||
public void push(InputStream inputStream) throws IOException {
|
||||
if (inputStream == null) {
|
||||
throw new IllegalArgumentException("Input stream can not be null.");
|
||||
@@ -87,23 +46,8 @@ public class InputStreamMerger extends InputStream {
|
||||
if (isClosed) {
|
||||
throw new IOException("Stream is closed");
|
||||
}
|
||||
while (!inputStreamBuffer.offer(inputStream)) {
|
||||
debug("[P] Waiting for a read to complete (" + inputStreamBuffer.size() + ")");
|
||||
synchronized (consumerMonitor) {
|
||||
consumerMonitor.notifyAll();
|
||||
}
|
||||
if (!inputStreamBuffer.offer(inputStream)) {
|
||||
synchronized (producerMonitor) {
|
||||
try {
|
||||
producerMonitor.wait();
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
debug("[P] End of wait");
|
||||
}
|
||||
debug("[P] Added a new input stream (buffer now has " + inputStreamBuffer.size() + " streams)");
|
||||
inputStreamBuffer.add(inputStream);
|
||||
debug("Added a new input stream (buffer now has " + inputStreamBuffer.size() + " streams)");
|
||||
}
|
||||
|
||||
public void reportFailure(Throwable e) {
|
||||
@@ -116,13 +60,6 @@ public class InputStreamMerger extends InputStream {
|
||||
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
if (currentStream != null) {
|
||||
return currentStream.available();
|
||||
}
|
||||
moveToNextInputStream();
|
||||
if (currentStream != null) {
|
||||
return currentStream.available();
|
||||
}
|
||||
return 4096;
|
||||
}
|
||||
|
||||
@@ -159,7 +96,7 @@ public class InputStreamMerger extends InputStream {
|
||||
}
|
||||
if (read < 0) {
|
||||
synchronized (exhaustLock) {
|
||||
debug("[C] Notify exhaust lock");
|
||||
debug("Notify exhaust lock");
|
||||
exhaustLock.notifyAll();
|
||||
}
|
||||
}
|
||||
@@ -170,30 +107,24 @@ public class InputStreamMerger extends InputStream {
|
||||
|
||||
private void throwLastFailure() throws IOException {
|
||||
if (lastFailure != null) {
|
||||
debug("[P] Report last failure exception to producer.");
|
||||
debug("Report last failure exception to producer.");
|
||||
throw new IOException("An exception occurred while processing last record.", lastFailure);
|
||||
}
|
||||
}
|
||||
|
||||
private void moveToNextInputStream() throws IOException {
|
||||
if (hasFinishedRead.get() && isClosed) {
|
||||
return;
|
||||
}
|
||||
// Throw any exception that might have occurred during previous records
|
||||
throwLastFailure();
|
||||
// Check the isClosed flag in case we've got waken up by a close()
|
||||
while (!warmUpStrategy.isReady(this) || (inputStreamBuffer.isEmpty() && !isClosed)) {
|
||||
synchronized (consumerMonitor) {
|
||||
while (inputStreamBuffer.isEmpty() && !isClosed) {
|
||||
synchronized (readLock) {
|
||||
try {
|
||||
debug("[C] Wait for more input (is warm up ready: " + warmUpStrategy.isReady(this) + ")");
|
||||
consumerMonitor.wait(1000);
|
||||
debug("[C] Wait for more input done.");
|
||||
debug("Wait for more input...");
|
||||
readLock.wait();
|
||||
debug("Wait for more input done.");
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (isClosed) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!inputStreamBuffer.isEmpty()) {
|
||||
@@ -203,12 +134,9 @@ public class InputStreamMerger extends InputStream {
|
||||
currentStream = inputStreamBuffer.poll();
|
||||
} else {
|
||||
currentStream = null;
|
||||
hasFinishedRead.set(true);
|
||||
hasFinishedRead = true;
|
||||
}
|
||||
synchronized (producerMonitor) {
|
||||
producerMonitor.notifyAll();
|
||||
}
|
||||
debug("[C] Remaining buffers : " + inputStreamBuffer.size());
|
||||
debug("Remaining buffers : " + inputStreamBuffer.size());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,28 +154,28 @@ public class InputStreamMerger extends InputStream {
|
||||
public void close() throws IOException {
|
||||
super.close();
|
||||
isClosed = true;
|
||||
warmUpStrategy = NoWarmUpStrategy.INSTANCE; // In case close() is called before end of warm up.
|
||||
synchronized (consumerMonitor) {
|
||||
consumerMonitor.notifyAll();
|
||||
synchronized (readLock) {
|
||||
readLock.notifyAll();
|
||||
}
|
||||
debug("[P] Input stream buffer size: " + inputStreamBuffer.size());
|
||||
debug("[P] Has finished read: " + hasFinishedRead);
|
||||
while (!inputStreamBuffer.isEmpty() && !hasFinishedRead.get()) {
|
||||
debug("Input stream buffer size: " + +inputStreamBuffer.size());
|
||||
debug("Has finished read: " + hasFinishedRead);
|
||||
debug("Stop condition: " + (!inputStreamBuffer.isEmpty() && !hasFinishedRead));
|
||||
while (!inputStreamBuffer.isEmpty() && !hasFinishedRead) {
|
||||
try {
|
||||
debug("[P] Waiting for exhaust... (" + inputStreamBuffer.size() + " remaining)");
|
||||
debug("Waiting for exhaust... (" + inputStreamBuffer.size() + " remaining)");
|
||||
synchronized (exhaustLock) {
|
||||
exhaustLock.wait(1000);
|
||||
exhaustLock.wait();
|
||||
}
|
||||
// In case we got woken up due to a failure
|
||||
throwLastFailure();
|
||||
debug("[P] Waiting for exhaust done.");
|
||||
debug("Waiting for exhaust done.");
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
// In case failure happened on very last read.
|
||||
throwLastFailure();
|
||||
debug("[P] Close completed.");
|
||||
debug("Close completed.");
|
||||
}
|
||||
|
||||
private static void debug(String message) {
|
||||
@@ -260,53 +188,4 @@ public class InputStreamMerger extends InputStream {
|
||||
public Throwable getLastReportedFailure() {
|
||||
return lastFailure;
|
||||
}
|
||||
|
||||
public int getBufferSize() {
|
||||
return inputStreamBuffer.size();
|
||||
}
|
||||
|
||||
interface WarmUpStrategy {
|
||||
/**
|
||||
* @param inputStreamMerger The input stream to be checked.
|
||||
* @return <code>true</code> if the <code>inputStreamMerger</code> is ready to be used by consumers.
|
||||
* @see org.talend.mdm.bulkload.client.InputStreamMerger#getBufferSize()
|
||||
*/
|
||||
boolean isReady(InputStreamMerger inputStreamMerger);
|
||||
}
|
||||
|
||||
/**
|
||||
* A "no warm up" warm up strategy: always returns <code>true</code> (<code>inputStreamMerger</code> is always
|
||||
* ready).
|
||||
*/
|
||||
public static class NoWarmUpStrategy implements WarmUpStrategy {
|
||||
static WarmUpStrategy INSTANCE = new NoWarmUpStrategy();
|
||||
|
||||
@Override
|
||||
public boolean isReady(InputStreamMerger inputStreamMerger) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A threshold based strategy: indicate input stream merger isn't ready till {@link org.talend.mdm.bulkload.client.InputStreamMerger#getBufferSize()}
|
||||
* is greater or equals to <code>threshold</code>. Once buffer size satisfies this condition, input stream is always
|
||||
* considered as ready.
|
||||
*/
|
||||
public static class ThresholdWarmUpStrategy implements WarmUpStrategy {
|
||||
private final int threshold;
|
||||
|
||||
private boolean isReady = false;
|
||||
|
||||
public ThresholdWarmUpStrategy(int threshold) {
|
||||
this.threshold = threshold;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReady(InputStreamMerger inputStreamMerger) {
|
||||
if (!isReady) {
|
||||
isReady = inputStreamMerger.getBufferSize() >= threshold;
|
||||
}
|
||||
return isReady;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ public class Client {
|
||||
public Client(String endpoint, String secretKey, String clientAccessID) throws ServiceException, MalformedURLException {
|
||||
// 1. change the endpoint.
|
||||
MktMktowsApiService service = new MktMktowsApiServiceLocator();
|
||||
((MktMktowsApiServiceLocator)service).setMktowsApiSoapPortEndpointAddress(endpoint);
|
||||
URL portAddress = new URL(endpoint);
|
||||
stub = service.getMktowsApiSoapPort(portAddress);
|
||||
// 2.assign secretKey and clientAccessID
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
||||
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.FormulaEvaluator;
|
||||
|
||||
public class ExcelTool {
|
||||
|
||||
@@ -286,26 +285,9 @@ public class ExcelTool {
|
||||
}
|
||||
}
|
||||
FileOutputStream fileOutput = new FileOutputStream(fileName);
|
||||
if(appendWorkbook && appendSheet){
|
||||
evaluateFormulaCell();
|
||||
}
|
||||
wb.write(fileOutput);
|
||||
fileOutput.close();
|
||||
}
|
||||
|
||||
public void evaluateFormulaCell(){
|
||||
FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
|
||||
for(int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++) {
|
||||
sheet = wb.getSheetAt(sheetNum);
|
||||
for(Row r : sheet) {
|
||||
for(Cell c : r) {
|
||||
if(c.getCellType() == Cell.CELL_TYPE_FORMULA) {
|
||||
evaluator.evaluateFormulaCell(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void flushRowInMemory() throws Exception{
|
||||
if (wb instanceof SXSSFWorkbook) {
|
||||
|
||||
@@ -4,7 +4,9 @@ HELP=org.talend.help.tAS400Connection
|
||||
HOST.NAME=Host
|
||||
LONG_NAME=Baut eine Verbindung zur AS400 Datenbank auf
|
||||
NB_LINE.NAME=Anzahl an Zeilen
|
||||
NULL_CHAR.NAME=Null Char
|
||||
PASS.NAME=Passwort
|
||||
PORT.NAME=Port
|
||||
PROPERTIES.NAME=Zusätzliche JDBC Parameter
|
||||
USER.NAME=Benutzername
|
||||
DB_VERSION.NAME=Datenbankversion
|
||||
@@ -12,6 +14,6 @@ DB_VERSION.ITEM.V5R2_V5R4=V5R2 bis V5R4
|
||||
DB_VERSION.ITEM.V5R3_V6R1=V5R3 bis V6R1
|
||||
USE_SHARED_CONNECTION.NAME=Verwende oder melde eine geteilte DB Verbindung an
|
||||
SHARED_CONNECTION_NAME.NAME=Gemeinsam verwendeter DB Verbindungsname
|
||||
AUTO_COMMIT.NAME=Autocommit
|
||||
AUTO_COMMIT.NAME=Autom. bestätigen
|
||||
TYPE.NAME=Datenbanktreiber
|
||||
PROPERTY.NAME=Eigenschaftstyp
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
DBNAME.NAME=Veriambar\u0131
|
||||
PASS.NAME=\u015Eifre
|
||||
PORT.NAME=Port
|
||||
USER.NAME=Kullan\u0131c\u0131 Ad\u0131
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
HELP=org.talend.help.tAS400Input
|
||||
HOST.NAME=Nom d'hôte
|
||||
HOST.NAME=Nom du serveur
|
||||
LONG_NAME=Lit une table et extrait les champs à partir d'une requête SQL
|
||||
PASS.NAME=Mot de passe
|
||||
PROPERTIES.NAME=Paramètres JDBC supplémentaires
|
||||
|
||||
@@ -3,7 +3,6 @@ PASS.NAME=Lozinka
|
||||
PROPERTIES.NAME=Dodatni JDBC Parametri
|
||||
SCHEMA_DB.NAME=\n\n \n\nCollection\n\nSchema
|
||||
USER.NAME=Korisni\u010Dko ime
|
||||
USE_EXISTING_CONNECTION.NAME=Koristi postoje\u0107u konekciju
|
||||
TABLE.NAME=Naziv tablice
|
||||
DB_VERSION.ITEM.V5R2_V5R4=V5R2 u V5R4
|
||||
DB_VERSION.ITEM.V5R3_V6R1=V5R3 u V6R1
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
DBNAME.NAME=Veriambar\u0131
|
||||
PASS.NAME=\u015Eifre
|
||||
SCHEMA_DB.NAME=\u015Eema
|
||||
USER.NAME=Kullan\u0131c\u0131 Ad\u0131
|
||||
SCHEMA.NAME=\u015Eema
|
||||
|
||||
@@ -65,8 +65,8 @@ imports="
|
||||
<%
|
||||
if ((rejectConnName==null && useBatchSize) && (("INSERT").equals(dataAction) || ("UPDATE").equals(dataAction) || ("DELETE").equals(dataAction))) {
|
||||
%>
|
||||
if (pstmt_<%=cid %> != null && batchSizeCounter_<%=cid%> >0) {
|
||||
try {
|
||||
if (pstmt_<%=cid %> != null) {
|
||||
<%
|
||||
if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -89,6 +89,7 @@ imports="
|
||||
<%
|
||||
}
|
||||
}%>
|
||||
}
|
||||
}catch (java.sql.BatchUpdateException e_<%=cid%>){
|
||||
<%if(("true").equals(dieOnError)) {
|
||||
%>
|
||||
@@ -123,12 +124,13 @@ imports="
|
||||
<%
|
||||
if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
if (pstmt_<%=cid %> != null) {
|
||||
tmp_batchUpdateCount_<%=cid%> = pstmt_<%=cid %>.getUpdateCount();
|
||||
insertedCount_<%=cid%>+= (tmp_batchUpdateCount_<%=cid%> >0 ? tmp_batchUpdateCount_<%=cid%>:0);
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
|
||||
|
||||
@@ -966,7 +966,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
if ((rejectConnName==null && useBatchSize) && (("INSERT").equals(dataAction) || ("UPDATE").equals(dataAction) || ("DELETE").equals(dataAction)) ) {
|
||||
%>
|
||||
if(batchSizeCounter_<%=cid%> > 0){
|
||||
try {
|
||||
<%
|
||||
if (("INSERT").equals(dataAction)) {
|
||||
@@ -1029,8 +1028,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
%>
|
||||
batchSizeCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
conn_<%=cid%>.commit();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
ADD_COLS.ITEM.NAME=\u0627\u0644\u0627\u0633\u0645
|
||||
ADD_COLS.ITEM.OPERATOR=\u0639\u0627\u0645\u0644
|
||||
ADD_COLS.ITEM.OPERATOR.ITEM.EQUAL=\u064A\u0633\u0627\u0648\u064A
|
||||
ADD_COLS.ITEM.OPERATOR.ITEM.GREAT_EQUAL_THAN=>
|
||||
ADD_COLS.ITEM.OPERATOR.ITEM.GREAT_THAN=\u0623\u0643\u0628\u0631 \u0623\u0648 \u064A\u0633\u0627\u0648\u064A
|
||||
@@ -29,4 +28,3 @@ FIELD_OPTIONS.ITEM.UPDATE_KEY=\u0645\u0641\u062A\u0627\u062D \u0627\u0644\u062A\
|
||||
HOST.NAME=\u0627\u0644\u0645\u0636\u064A\u0641
|
||||
PASS.NAME=\u0631\u0645\u0632 \u0627\u0644\u0645\u0631\u0648\u0631
|
||||
SCHEMA_FLOW.NAME=\u0645\u062E\u0637\u0637
|
||||
BATCH_SIZE.NAME=\u062D\u062C\u0645 \u0627\u0644\u062F\u0641\u0639\u0629
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
ADD_COLS.ITEM.DATATYPE=Datentyp
|
||||
ADD_COLS.ITEM.NAME=Name
|
||||
ADD_COLS.ITEM.OPERATOR=Operator
|
||||
ADD_COLS.ITEM.OPERATOR.ITEM.EQUAL=\
|
||||
ADD_COLS.ITEM.OPERATOR.ITEM.GREAT_EQUAL_THAN=>\
|
||||
|
||||
@@ -68,5 +68,3 @@ TYPE.NAME=\u039F\u03B4\u03B7\u03B3\u03CC\u03C2 \u0392\u03AC\u03C3\u03B7\u03C2 \u
|
||||
MAPPING.NAME=\u03A7\u03B1\u03C1\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7
|
||||
SUPPORT_NULL_WHERE.NAME=\u03A5\u03C0\u03BF\u03C3\u03C4\u03AE\u03C1\u03B9\u03BE\u03B7 null \u03C3\u03C4\u03B7 \u03B4\u03AE\u03BB\u03C9\u03C3\u03B7 "SQL WHERE"
|
||||
CONNECTION.NAME=\u039B\u03AF\u03C3\u03C4\u03B1 \u03A3\u03C5\u03C3\u03C4\u03B1\u03C4\u03B9\u03BA\u03CE\u03BD \u03A3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03C9\u03BD
|
||||
USE_BATCH_SIZE.NAME=\u03A7\u03C1\u03AE\u03C3\u03B7 \u039C\u03B5\u03B3\u03AD\u03B8\u03BF\u03C5\u03C2 \u0394\u03AD\u03C3\u03BC\u03B7\u03C2
|
||||
BATCH_SIZE.NAME=\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B4\u03AD\u03C3\u03BC\u03B7\u03C2
|
||||
|
||||
@@ -25,7 +25,6 @@ PASS.NAME=Lozinka
|
||||
PROPERTIES.NAME=Dodatni JDBC Parametri
|
||||
SCHEMA_FLOW.NAME=\n\n \n\nCollection\n\nSchema
|
||||
USER.NAME=Korisni\u010Dko ime
|
||||
USE_EXISTING_CONNECTION.NAME=Koristi postoje\u0107u konekciju
|
||||
DB_VERSION.ITEM.V5R2_V5R4=V5R2 u V5R4
|
||||
DB_VERSION.ITEM.V5R3_V6R1=V5R3 u V6R1
|
||||
PROPERTY.NAME=Tip svojstva
|
||||
|
||||
@@ -48,4 +48,3 @@ TYPE.NAME=Sterownik bazy danych
|
||||
MAPPING.NAME=Mapowanie
|
||||
SUPPORT_NULL_WHERE.NAME=Wparcie NULL w klauzuli "SQL WHERE"
|
||||
CONNECTION.NAME=Lista komponentów
|
||||
BATCH_SIZE.NAME=Rozmiar wsadu
|
||||
|
||||
@@ -7,4 +7,3 @@ USER.NAME=Nume utilizator
|
||||
USE_COMMIT_CONTROL.NAME=Foloseste controlul commit
|
||||
USE_EXISTING_CONNECTION.NAME=Folosire conexiune existent\u0103
|
||||
USE_FIELD_OPTIONS.NAME=Foloseste optiuni de camp
|
||||
USE_BATCH_SIZE.NAME=Folose\u015Fte M\u0103rime Batch
|
||||
|
||||
@@ -13,4 +13,3 @@ FIELD_OPTIONS.ITEM.UPDATABLE=G
|
||||
FIELD_OPTIONS.ITEM.UPDATE_KEY=Güncelleme anahtar\u0131
|
||||
PASS.NAME=\u015Eifre
|
||||
SCHEMA_FLOW.NAME=\u015Eema
|
||||
USER.NAME=Kullan\u0131c\u0131 Ad\u0131
|
||||
|
||||
@@ -5,7 +5,6 @@ PASS.NAME=Lozinka
|
||||
PROPERTIES.NAME=Dodatni JDBC Parametri
|
||||
SCHEMA_DB.NAME=\n\n \n\nCollection\n\nSchema
|
||||
USER.NAME=Korisni\u010Dko ime
|
||||
USE_EXISTING_CONNECTION.NAME=Koristi postoje\u0107u konekciju
|
||||
TABLE.NAME=Naziv tablice
|
||||
DB_VERSION.ITEM.V5R2_V5R4=V5R2 u V5R4
|
||||
DB_VERSION.ITEM.V5R3_V6R1=V5R3 u V6R1
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
DBNAME.NAME=Veriambar\u0131
|
||||
PASS.NAME=\u015Eifre
|
||||
SCHEMA_DB.NAME=\u015Eema
|
||||
USER.NAME=Kullan\u0131c\u0131 Ad\u0131
|
||||
SCHEMA_FLOW.NAME=\u015Eema
|
||||
|
||||
@@ -4,6 +4,7 @@ FILENAME.NAME=Lokaler Dateiname
|
||||
HELP=org.talend.help.tAccessBulkExec
|
||||
LONG_NAME=Führt auf einer Access Datenbank einen Upload einer Bulk Datei durch
|
||||
NB_LINE.NAME=Anzahl Zeilen
|
||||
NULL_CHAR.NAME=Null Char
|
||||
PASS.NAME=Passwort
|
||||
TABLE.NAME=Tabelle
|
||||
USER.NAME=Benutzername
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
DBNAME.NAME=Veriambar\u0131
|
||||
PASS.NAME=\u015Eifre
|
||||
USER.NAME=Kullan\u0131c\u0131 Ad\u0131
|
||||
SCHEMA.NAME=\u015Eema
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
ENCODING.NAME=Encoding
|
||||
HOST.NAME=Host
|
||||
PASS.NAME=Passwort
|
||||
PORT.NAME=Port
|
||||
PROPERTIES.NAME=Zusätzliche JDBC Parameter
|
||||
USE_SHARED_CONNECTION.NAME=Verwende oder melde eine geteilte DB Verbindung an
|
||||
SHARED_CONNECTION_NAME.NAME=Gemeinsam verwendeter DB Verbindungsname
|
||||
AUTO_COMMIT.NAME=Autocommit
|
||||
AUTO_COMMIT.NAME=Autom. bestätigen
|
||||
TYPE.NAME=Datenbank Treiber
|
||||
PROPERTY.NAME=Eigenschaftstyp
|
||||
DB_VERSION.NAME=Datenbankversion
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
DBNAME.NAME=Veriambar\u0131
|
||||
PASS.NAME=\u015Eifre
|
||||
PORT.NAME=Port
|
||||
USER.NAME=Kullan\u0131c\u0131 Ad\u0131
|
||||
|
||||
@@ -15,7 +15,6 @@ DATA_ACTION.NAME=\u0627\u0644\u0639\u0645\u0644 \u0639\u0644\u0649 \u0627\u0644\
|
||||
DBNAME.NAME=\u0642\u0627\u0639\u062F\u0629 \u0627\u0644\u0628\u064A\u0627\u0646\u0627\u062A
|
||||
PASS.NAME=\u0631\u0645\u0632 \u0627\u0644\u0645\u0631\u0648\u0631
|
||||
SCHEMA_FLOW.NAME=\u0645\u062E\u0637\u0637
|
||||
ADD_COLS.ITEM.OPERATOR=\u0639\u0627\u0645\u0644
|
||||
ADD_COLS.ITEM.OPERATOR.ITEM.EQUAL==
|
||||
ADD_COLS.ITEM.OPERATOR.ITEM.NOT_EQUAL=<>
|
||||
ADD_COLS.ITEM.OPERATOR.ITEM.LESS_THAN=\u0623\u0642\u0644 \u0645\u0646
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
ADD_COLS.ITEM.NAME=Name
|
||||
ADD_COLS.ITEM.DATATYPE=Datentyp
|
||||
ADD_COLS.ITEM.POS=Position
|
||||
ADD_COLS.ITEM.POS.ITEM.AFTER=Nach
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
DB_SCHEMA.NAME=\u015Eema
|
||||
PASS.NAME=\u015Eifre
|
||||
SCHEMA.NAME=\u015Eema
|
||||
USER.NAME=Kullan\u0131c\u0131 Ad\u0131
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
LONG_NAME=Ermittelt die Lage (Land) anhand einer IP-Adresse oder des Hostnamens
|
||||
HELP=org.talend.help.tAddLocationFromIP
|
||||
DATABASE_FILEPATH.NAME=Datenbank Dateipfad
|
||||
INPUT_COLUMN.NAME=Eingabespalte
|
||||
INPUT_IP.NAME=Eingabewert ist eine IP Adresse
|
||||
LOCATION_TYPE_CODE2.NAME=Ländercode 2 Buchstaben
|
||||
LOCATION_TYPE_CODE3.NAME=Ländercode 3 Buchstaben
|
||||
|
||||
@@ -11,4 +11,3 @@ SCHEMA.NAME=\n\n \n\nCollection\n\nSchema
|
||||
GROUP.ITEM.ORDER=Poredak
|
||||
LOOP.ITEM.ORDER=Poredak
|
||||
ROOT.ITEM.ORDER=Poredak
|
||||
XSL_TYPE.NAME=Tip
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
ROOT.NAME=\uB8E8\uD2B8
|
||||
@@ -14,7 +14,6 @@ ROOT.ITEM.VALUE=\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u043E \u
|
||||
SCHEMA.NAME=\u0421\u0445\u0435\u043C\u0430
|
||||
SPLIT.NAME=\u0420\u0430\u0437\u0431\u0438\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043D\u0430 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0444\u0430\u0439\u043B\u043E\u0432
|
||||
SPLIT_EVERY.NAME=\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0442\u0440\u043E\u043A \u0432 \u043A\u0430\u0436\u0434\u043E\u043C \u0444\u0430\u0439\u043B\u0435 \u0432\u044B\u0432\u043E\u0434\u0430
|
||||
THOUSANDS_SEPARATOR.NAME=\u0422\u044B\u0441\u044F\u0447\u043D\u044B\u0439 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C
|
||||
GROUP.ITEM.ORDER=\u041F\u043E\u0440\u044F\u0434\u043E\u043A
|
||||
LOOP.ITEM.ORDER=\u041F\u043E\u0440\u044F\u0434\u043E\u043A
|
||||
ROOT.ITEM.ORDER=\u041F\u043E\u0440\u044F\u0434\u043E\u043A
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
ROOT.NAME=Kök
|
||||
SCHEMA.NAME=\u015Eema
|
||||
XSL_TYPE.NAME=Tip
|
||||
|
||||
@@ -3,3 +3,4 @@ HELP=org.talend.help.tAdvancedHash
|
||||
RUN_IF.MENU=\u0395\u03BA\u03C4\u03AD\u03BB\u03B5\u03C3\u03B7 \u0395\u03AC\u03BD
|
||||
RUN_IF.LINK=\u0395\u03AC\u03BD
|
||||
SCHEMA.NAME=\u03A3\u03C7\u03AE\u03BC\u03B1
|
||||
NB_LINE.NAME=\u0391\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2
|
||||
|
||||
@@ -2,4 +2,3 @@ LONG_NAME=\u30CF\u30C3\u30B7\u30E5\u30D0\u30C3\u30D5\u30A1\u3092\u4F5C\u6210
|
||||
HELP=org.talend.help.tAdvancedHash
|
||||
RUN_IF.MENU=\u6761\u4EF6\u4ED8\u304D\u5B9F\u884C
|
||||
RUN_IF.LINK=If
|
||||
NB_LINE.NAME=\u884C\u6570
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
RUN_IF.MENU=\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0435\u0441\u043B\u0438
|
||||
RUN_IF.LINK=\u0415\u0441\u043B\u0438
|
||||
SCHEMA.NAME=\u0421\u0445\u0435\u043C\u0430
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user