You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by rk...@apache.org on 2016/08/04 19:05:20 UTC
[1/4] oozie git commit: OOZIE-2625 Drop workflowgenerator (rkanter)
Repository: oozie
Updated Branches:
refs/heads/master d03d46346 -> aec39dd26
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/ShellActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/ShellActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/ShellActionWidget.java
deleted file mode 100644
index d77cb43..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/ShellActionWidget.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of shell action
- */
-public class ShellActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public ShellActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-ShellActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/StreamingActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/StreamingActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/StreamingActionWidget.java
deleted file mode 100644
index 3235822..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/StreamingActionWidget.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of MR streaming action
- */
-public class StreamingActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public StreamingActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-StreamingActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/SubWFActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/SubWFActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/SubWFActionWidget.java
deleted file mode 100644
index 04428be..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/SubWFActionWidget.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of subworkflow action
- */
-public class SubWFActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public SubWFActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-SubWFActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/DecisionNodeWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/DecisionNodeWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/DecisionNodeWidget.java
deleted file mode 100644
index 8fb87cc..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/DecisionNodeWidget.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.DecisionPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of decision node
- */
-public class DecisionNodeWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public DecisionNodeWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-DecisionNodeWidget");
- }
-
- /**
- * Update a list of node widgets that this node widget has connection to
- */
- @Override
- protected void updateOnSelection() {
- table.updateWidgetDropDown();
- ((DecisionPropertyTable) table).updateNeighborList();
- ((DecisionPropertyTable) table).updateNeighborTable();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/EndNodeWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/EndNodeWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/EndNodeWidget.java
deleted file mode 100644
index bb3f309..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/EndNodeWidget.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for node widget of end node
- */
-public class EndNodeWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public EndNodeWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-EndNodeWidget");
- }
-
- /**
- * Generate xml elements of end node and attach them to xml doc
- */
- @Override
- public void generateXML(Document doc, Element root, NodeWidget next) {
- Element endele = doc.createElement("end");
- endele.setAttribute("name", getName());
- root.appendChild(endele);
- }
-
- @Override
- protected void updateOnSelection() {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/ForkNodeWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/ForkNodeWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/ForkNodeWidget.java
deleted file mode 100644
index 262856f..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/ForkNodeWidget.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.ForkPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of fork node
- */
-public class ForkNodeWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public ForkNodeWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-ForkNodeWidget");
- }
-
- /**
- * Update current lists of node widgets when clicked in workflow design
- * panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- ((ForkPropertyTable) table).updateNeighborList();
- ((ForkPropertyTable) table).updateNeighborTable();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/JoinNodeWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/JoinNodeWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/JoinNodeWidget.java
deleted file mode 100644
index 3070223..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/JoinNodeWidget.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of join node
- */
-public class JoinNodeWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public JoinNodeWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-JoinNodeWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/KillNodeWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/KillNodeWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/KillNodeWidget.java
deleted file mode 100644
index 2c1b300..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/KillNodeWidget.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of kill node
- */
-public class KillNodeWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public KillNodeWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-KillNodeWidget");
- }
-
- @Override
- protected void updateOnSelection() {
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/StartNodeWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/StartNodeWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/StartNodeWidget.java
deleted file mode 100644
index 4349ba5..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/control/StartNodeWidget.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for node widget of start node
- */
-public class StartNodeWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public StartNodeWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-StartNodeWidget");
- }
-
- /**
- * Set a name of node widget (note that start node doesn't have name, making
- * it empty to avoid exception)
- */
- @Override
- public void setName(String s) {
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- }
-
- /**
- * Generate xml elements of start node and attach them to xml doc
- */
- @Override
- public void generateXML(Document doc, Element root, NodeWidget next) {
- Element startele = doc.createElement("start");
- startele.setAttribute("to", next.getName());
- root.appendChild(startele);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/workflowgenerator.gwt.xml
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/workflowgenerator.gwt.xml b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/workflowgenerator.gwt.xml
deleted file mode 100644
index 1bcd2d6..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/workflowgenerator.gwt.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<module rename-to='workflowgenerator'>
- <!-- Inherit the core Web Toolkit stuff-->
- <inherits name='com.google.gwt.user.User'/>
- <inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
- <inherits name='com.orange.links.Links' />
- <inherits name="com.google.gwt.xml.XML" />
- <inherits name='com.google.gwt.widgetideas.WidgetIdeas' />
- <inherits name='com.google.gwt.libideas.LibIdeas' />
-
- <!-- Inherit the default GWT style sheet. You can change -->
- <!-- the theme of your GWT application by uncommenting -->
- <!-- any one of the following lines. -->
- <inherits name='com.google.gwt.user.theme.clean.Clean'/>
- <!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
- <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
- <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
-
- <!-- Other module inherits -->
-
- <!-- Specify the app entry point class. -->
- <entry-point class='org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator'/>
-
- <!-- Specify the paths for translatable code -->
- <source path='client'/>
-</module>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/action.png b/workflowgenerator/src/main/resources/img/action.png
deleted file mode 100644
index aaeb924..0000000
Binary files a/workflowgenerator/src/main/resources/img/action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/add-btn.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/add-btn.png b/workflowgenerator/src/main/resources/img/add-btn.png
deleted file mode 100644
index 9c18d4a..0000000
Binary files a/workflowgenerator/src/main/resources/img/add-btn.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/decision.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/decision.png b/workflowgenerator/src/main/resources/img/decision.png
deleted file mode 100644
index 68d1ecb..0000000
Binary files a/workflowgenerator/src/main/resources/img/decision.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/del-btn.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/del-btn.png b/workflowgenerator/src/main/resources/img/del-btn.png
deleted file mode 100644
index 7531614..0000000
Binary files a/workflowgenerator/src/main/resources/img/del-btn.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/distcp-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/distcp-action.png b/workflowgenerator/src/main/resources/img/distcp-action.png
deleted file mode 100644
index 8656254..0000000
Binary files a/workflowgenerator/src/main/resources/img/distcp-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/email-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/email-action.png b/workflowgenerator/src/main/resources/img/email-action.png
deleted file mode 100644
index 024655b..0000000
Binary files a/workflowgenerator/src/main/resources/img/email-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/end.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/end.png b/workflowgenerator/src/main/resources/img/end.png
deleted file mode 100644
index b37f92f..0000000
Binary files a/workflowgenerator/src/main/resources/img/end.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/fork-shape.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/fork-shape.png b/workflowgenerator/src/main/resources/img/fork-shape.png
deleted file mode 100644
index 6bcbef7..0000000
Binary files a/workflowgenerator/src/main/resources/img/fork-shape.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/fork.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/fork.png b/workflowgenerator/src/main/resources/img/fork.png
deleted file mode 100644
index 3c240f0..0000000
Binary files a/workflowgenerator/src/main/resources/img/fork.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/fs-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/fs-action.png b/workflowgenerator/src/main/resources/img/fs-action.png
deleted file mode 100644
index 96ceb54..0000000
Binary files a/workflowgenerator/src/main/resources/img/fs-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/hive-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/hive-action.png b/workflowgenerator/src/main/resources/img/hive-action.png
deleted file mode 100644
index 547c858..0000000
Binary files a/workflowgenerator/src/main/resources/img/hive-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/java-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/java-action.png b/workflowgenerator/src/main/resources/img/java-action.png
deleted file mode 100644
index 5b17296..0000000
Binary files a/workflowgenerator/src/main/resources/img/java-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/join-shape.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/join-shape.png b/workflowgenerator/src/main/resources/img/join-shape.png
deleted file mode 100644
index e79ba16..0000000
Binary files a/workflowgenerator/src/main/resources/img/join-shape.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/join.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/join.png b/workflowgenerator/src/main/resources/img/join.png
deleted file mode 100644
index 5c28024..0000000
Binary files a/workflowgenerator/src/main/resources/img/join.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/kill.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/kill.png b/workflowgenerator/src/main/resources/img/kill.png
deleted file mode 100644
index b324aad..0000000
Binary files a/workflowgenerator/src/main/resources/img/kill.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/mr-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/mr-action.png b/workflowgenerator/src/main/resources/img/mr-action.png
deleted file mode 100644
index 2c799c8..0000000
Binary files a/workflowgenerator/src/main/resources/img/mr-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/pig-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/pig-action.png b/workflowgenerator/src/main/resources/img/pig-action.png
deleted file mode 100644
index b4f9713..0000000
Binary files a/workflowgenerator/src/main/resources/img/pig-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/pipes-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/pipes-action.png b/workflowgenerator/src/main/resources/img/pipes-action.png
deleted file mode 100644
index 6bdc803..0000000
Binary files a/workflowgenerator/src/main/resources/img/pipes-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/shell-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/shell-action.png b/workflowgenerator/src/main/resources/img/shell-action.png
deleted file mode 100644
index d756793..0000000
Binary files a/workflowgenerator/src/main/resources/img/shell-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/ssh-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/ssh-action.png b/workflowgenerator/src/main/resources/img/ssh-action.png
deleted file mode 100644
index 5f8c417..0000000
Binary files a/workflowgenerator/src/main/resources/img/ssh-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/start-shape.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/start-shape.png b/workflowgenerator/src/main/resources/img/start-shape.png
deleted file mode 100644
index 60faa54..0000000
Binary files a/workflowgenerator/src/main/resources/img/start-shape.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/start.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/start.png b/workflowgenerator/src/main/resources/img/start.png
deleted file mode 100644
index e114e3c..0000000
Binary files a/workflowgenerator/src/main/resources/img/start.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/streaming-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/streaming-action.png b/workflowgenerator/src/main/resources/img/streaming-action.png
deleted file mode 100644
index 2094d96..0000000
Binary files a/workflowgenerator/src/main/resources/img/streaming-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/img/subwf-action.png
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/img/subwf-action.png b/workflowgenerator/src/main/resources/img/subwf-action.png
deleted file mode 100644
index acb4c4f..0000000
Binary files a/workflowgenerator/src/main/resources/img/subwf-action.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/resources/org/apache/oozie/tools/workflowgenerator/workflowgenerator.gwt.xml
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/resources/org/apache/oozie/tools/workflowgenerator/workflowgenerator.gwt.xml b/workflowgenerator/src/main/resources/org/apache/oozie/tools/workflowgenerator/workflowgenerator.gwt.xml
deleted file mode 100644
index d3c0809..0000000
--- a/workflowgenerator/src/main/resources/org/apache/oozie/tools/workflowgenerator/workflowgenerator.gwt.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<module rename-to='workflowgenerator'>
- <!-- Inherit the core Web Toolkit stuff -->
- <inherits name='com.google.gwt.user.User'/>
- <inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
- <inherits name='com.orange.links.Links' />
- <inherits name="com.google.gwt.xml.XML" />
- <inherits name='com.google.gwt.widgetideas.WidgetIdeas' />
- <inherits name='com.google.gwt.libideas.LibIdeas' />
-
- <!-- Inherit the default GWT style sheet. You can change -->
- <!-- the theme of your GWT application by uncommenting -->
- <!-- any one of the following lines. -->
- <inherits name='com.google.gwt.user.theme.clean.Clean'/>
- <!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
- <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
- <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
-
- <!-- Other module inherits -->
-
- <!-- Specify the app entry point class. -->
- <entry-point class='org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator'/>
-
- <!-- Specify the paths for translatable code -->
- <source path='client'/>
-</module>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/webapp/WEB-INF/web.xml b/workflowgenerator/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 0aa0f34..0000000
--- a/workflowgenerator/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-
- <!-- Servlets -->
- <!-- Default page to serve -->
- <welcome-file-list>
- <welcome-file>workflowgenerator.html</welcome-file>
- </welcome-file-list>
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/webapp/workflowgenerator.css
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/webapp/workflowgenerator.css b/workflowgenerator/src/main/webapp/workflowgenerator.css
deleted file mode 100644
index e44e7a8..0000000
--- a/workflowgenerator/src/main/webapp/workflowgenerator.css
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/** Add css rules here for your application. */
-
-
-/** Example rules used by the template application (remove for your app) */
-h1 {
- font-size: 2em;
- font-weight: bold;
- color: #777777;
- margin: 40px 0px 70px;
- text-align: center;
-}
-
-.sendButton {
- display: block;
- font-size: 16pt;
-}
-
-/** Most GWT widgets already have a style name defined */
-.gwt-DialogBox {
- width: 400px;
-}
-
-.dialogVPanel {
- margin: 5px;
-}
-
-.serverResponseLabelError {
- color: red;
-}
-
-/** Set ids using widget.getElement().setId("idOfElement") */
-#closeButton {
- margin: 15px 6px 6px;
-}
-
-.oozie-MapReduceActionWidget {
-border: 0;
-background-image: url("img/mr-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-StreamingActionWidget {
-border: 0;
-background-image: url("img/streaming-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-PipesActionWidget {
-border: 0;
-background-image: url("img/pipes-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-PigActionWidget {
-border: 0;
-background-image: url("img/pig-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-JavaActionWidget {
-border: 0;
-background-image: url("img/java-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-FSActionWidget {
-border: 0;
-background-image: url("img/fs-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-SSHActionWidget {
-border: 0;
-background-image: url("img/ssh-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-SubWFActionWidget {
-border: 0;
-background-image: url("img/subwf-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-EmailActionWidget {
-border: 0;
-background-image: url("img/email-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-ShellActionWidget {
-border: 0;
-background-image: url("img/shell-action.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 43px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-StartNodeWidget {
-border: 0;
-background-image: url("img/start.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 50px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-EndNodeWidget {
-border: 0;
-background-image: url("img/end.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 50px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-KillNodeWidget {
-border: 0;
-background-image: url("img/kill.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 50px;
-padding: 0px 0px 0px 0px;
-
-}
-
-.oozie-DecisionNodeWidget {
-border: 0;
-background-image: url("img/decision.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 50px;
-padding: 0px 0px 0px 0px;
-
-}
-
-.oozie-ForkNodeWidget {
-border: 0;
-background-image: url("img/fork.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 50px;
-padding: 0px 0px 0px 0px;
-}
-
-.oozie-JoinNodeWidget {
-border: 0;
-background-image: url("img/join.png");
-background-repeat: no-repeat;
-width: 50px;
-height: 50px;
-padding: 0px 0px 0px 0px;
-}
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/webapp/workflowgenerator.html
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/webapp/workflowgenerator.html b/workflowgenerator/src/main/webapp/workflowgenerator.html
deleted file mode 100644
index c5f250d..0000000
--- a/workflowgenerator/src/main/webapp/workflowgenerator.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!doctype html>
-<!-- The DOCTYPE declaration above will set the -->
-<!-- browser's rendering engine into -->
-<!-- "Standards Mode". Replacing this declaration -->
-<!-- with a "Quirks Mode" doctype may lead to some -->
-<!-- differences in layout. -->
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-
- <!-- -->
- <!-- Consider inlining CSS to reduce the number of requested files -->
- <!-- -->
- <link type="text/css" rel="stylesheet" href="workflowgenerator.css">
-
- <!-- -->
- <!-- Any title is fine -->
- <!-- -->
- <title>Workflow Generator Tool</title>
-
- <!-- -->
- <!-- This script loads your compiled module. -->
- <!-- If you add any GWT meta tags, they must -->
- <!-- be added before this line. -->
- <!-- -->
- <script type="text/javascript" language="javascript" src="workflowgenerator/workflowgenerator.nocache.js"></script>
- </head>
-
- <!-- -->
- <!-- The body can have arbitrary html, or -->
- <!-- you can leave the body empty if you want -->
- <!-- to create a completely dynamic UI. -->
- <!-- -->
- <body>
-
- <!-- OPTIONAL: include this if you want history support -->
- <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
-
- <!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
- <noscript>
- <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
- Your web browser must have JavaScript enabled
- in order for this application to display correctly.
- </div>
- </noscript>
-
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/test/java/org/apache/oozie/tools/workflowgenerator/client/OozieWorkflowGeneratorTest.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/test/java/org/apache/oozie/tools/workflowgenerator/client/OozieWorkflowGeneratorTest.java b/workflowgenerator/src/test/java/org/apache/oozie/tools/workflowgenerator/client/OozieWorkflowGeneratorTest.java
deleted file mode 100644
index 711fe53..0000000
--- a/workflowgenerator/src/test/java/org/apache/oozie/tools/workflowgenerator/client/OozieWorkflowGeneratorTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.apache.oozie.tools.workflowgenerator.client;
-
-import junit.framework.TestCase;
-
-import org.junit.Test;
-
-public class OozieWorkflowGeneratorTest extends TestCase{
-
- //TODO very first test of wfgen and does not do much.
- @Test
- public void test1() {
- OozieWorkflowGenerator entry = new OozieWorkflowGenerator();
- assertTrue(entry instanceof OozieWorkflowGenerator);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/workflowgeneratorTest-dev.launch
----------------------------------------------------------------------
diff --git a/workflowgenerator/workflowgeneratorTest-dev.launch b/workflowgenerator/workflowgeneratorTest-dev.launch
deleted file mode 100644
index 7dd8b4e..0000000
--- a/workflowgenerator/workflowgeneratorTest-dev.launch
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<launchConfiguration type="com.google.gwt.eclipse.core.launch.gwtJUnit">
-<stringAttribute key="com.google.gwt.eclipse.core.LOG_LEVEL" value="INFO"/>
-<booleanAttribute key="com.google.gwt.eclipse.core.NOT_HEADLESS" value="false"/>
-<stringAttribute key="com.google.gwt.eclipse.core.OUT_DIR" value="www-test"/>
-<booleanAttribute key="com.google.gwt.eclipse.core.STANDARDS_MODE" value="false"/>
-<stringAttribute key="com.google.gwt.eclipse.core.STYLE" value="OBFUSCATED"/>
-<stringAttribute key="com.google.gwt.eclipse.core.WEB_MODE" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/workflowgenerator/src/test/java/org/apache/oozie/tools/workflowgenerator/client/GwtTestworkflowgenerator.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.oozie.tools.workflowgenerator.client.GwtTestworkflowgenerator"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="workflowgenerator"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/workflowgeneratorTest-prod.launch
----------------------------------------------------------------------
diff --git a/workflowgenerator/workflowgeneratorTest-prod.launch b/workflowgenerator/workflowgeneratorTest-prod.launch
deleted file mode 100644
index cee6364..0000000
--- a/workflowgenerator/workflowgeneratorTest-prod.launch
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<launchConfiguration type="com.google.gwt.eclipse.core.launch.gwtJUnit">
-<stringAttribute key="com.google.gwt.eclipse.core.LOG_LEVEL" value="INFO"/>
-<booleanAttribute key="com.google.gwt.eclipse.core.NOT_HEADLESS" value="false"/>
-<stringAttribute key="com.google.gwt.eclipse.core.OUT_DIR" value="www-test"/>
-<booleanAttribute key="com.google.gwt.eclipse.core.STANDARDS_MODE" value="false"/>
-<stringAttribute key="com.google.gwt.eclipse.core.STYLE" value="OBFUSCATED"/>
-<stringAttribute key="com.google.gwt.eclipse.core.WEB_MODE" value="true"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/workflowgenerator/src/test/java/org/apache/oozie/tools/workflowgenerator/client/GwtTestworkflowgenerator.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.oozie.tools.workflowgenerator.client.GwtTestworkflowgenerator"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="workflowgenerator"/>
-</launchConfiguration>
[2/4] oozie git commit: OOZIE-2625 Drop workflowgenerator (rkanter)
Posted by rk...@apache.org.
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/ShellPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/ShellPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/ShellPropertyTable.java
deleted file mode 100644
index 188157e..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/ShellPropertyTable.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.Property;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HasVerticalAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.RadioButton;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of shell action
- */
-public class ShellPropertyTable extends PropertyTable {
-
- private TextBox jt;
- private TextBox nn;
- private TextBox exec;
- private List<Property> configs;
- private List<Property> prepare;
- private List<Property> others;
- private RadioButton rby;
- private RadioButton rbn;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w
- */
- public ShellPropertyTable(NodeWidget w) {
- super(w);
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- protected void initConf() {
- configs = new ArrayList<Property>();
- configs.add(new Property("mapred.job.queue.name", ""));
-
- prepare = new ArrayList<Property>();
- prepare.add(new Property("", ""));
-
- others = new ArrayList<Property>();
- others.add(new Property("", ""));
- }
-
- /**
- * Generate xml elements of shell action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <shell>
- Element shellEle = doc.createElement("shell");
- action.appendChild(shellEle);
-
- // create <job-tracker>
- shellEle.appendChild(generateElement(doc, "job-tracker", jt));
-
- // create <name-node>
- shellEle.appendChild(generateElement(doc, "name-node", nn));
-
- // create <prepare>
- prepareToXML(prepare, shellEle, doc);
-
- // create <job-xml>
- filterListToXML(others, shellEle, doc, "job-xml");
-
- // create <configuration>
- configToXML(configs, shellEle, doc);
-
- // create <exec>
- shellEle.appendChild(generateElement(doc, "exec", exec));
-
- // create <argument>
- filterListToXML(others, shellEle, doc, "argument");
-
- // create <env-var>
- filterListToXML(others, shellEle, doc, "env-var");
-
- // create <file>
- filterListToXML(others, shellEle, doc, "file");
-
- // create <archive>
- filterListToXML(others, shellEle, doc, "archive");
-
- // create <capture-output>
- if (rby.getValue()) {
- Element outputele = doc.createElement("capture-output");
- shellEle.appendChild(outputele);
- }
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(10, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for JobTracker
- jt = insertTextRow(grid, 3, "JobTracker");
-
- // insert row for NameNode
- nn = insertTextRow(grid, 4, "NameNode");
-
- // insert row for Exec
- exec = insertTextRow(grid, 5, "Exec");
-
- // insert row for Parameter
- grid.setWidget(6, 0, createLabel("Parameter"));
- grid.setWidget(
- 6,
- 1,
- createSubTable("Tag", "value", others,
- Arrays.asList("", "argument", "job-xml", "env-var", "file", "archive")));
-
- // insert row for Configuration
- grid.setWidget(7, 0, createLabel("Configuration"));
- grid.setWidget(7, 1, createSubTable("Property Name", "Value", configs, null));
-
- // insert row for prepare
- grid.setWidget(8, 0, createLabel("Prepare"));
- grid.setWidget(8, 1, createSubTable("Operation", "Path", prepare, Arrays.asList("", "delete", "mkdir")));
-
- // insert row for Capture output
- grid.setWidget(9, 0, createLabel("Capture Output"));
- HorizontalPanel btnpanel = new HorizontalPanel();
- btnpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
- rbn = new RadioButton("outputGroup", "false");
- rby = new RadioButton("outputGroup", "true");
- rbn.setChecked(true);
- btnpanel.add(rby);
- btnpanel.add(rbn);
- grid.setWidget(9, 1, btnpanel);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/StreamingPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/StreamingPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/StreamingPropertyTable.java
deleted file mode 100644
index 21d5628..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/StreamingPropertyTable.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.Property;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.xml.client.Text;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of MR streaming action
- */
-public class StreamingPropertyTable extends MapReducePropertyTable {
-
- private List<Property> streaming;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public StreamingPropertyTable(NodeWidget w) {
- super(w);
- }
-
- /**
- * Initialize a property table
- */
- @Override
- protected void init() {
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- @Override
- protected void initConf() {
- configs = new ArrayList<Property>();
- configs.add(new Property("mapred.job.queue.name", ""));
-
- prepare = new ArrayList<Property>();
- prepare.add(new Property("", ""));
-
- others = new ArrayList<Property>();
- others.add(new Property("", ""));
-
- streaming = new ArrayList<Property>();
- streaming.add(new Property("", ""));
- }
-
- /**
- * Generate xml elements of streaming action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <map-reduce>
- Element mrEle = doc.createElement("map-reduce");
- action.appendChild(mrEle);
-
- // create <job-tracker>
- mrEle.appendChild(generateElement(doc, "job-tracker", jt));
-
- // create <name-node>
- mrEle.appendChild(generateElement(doc, "name-node", nn));
-
- // create <prepare>
- prepareToXML(prepare, mrEle, doc);
-
- // create <streaming>
- Element streamEle = null;
- streamEle = filterListToXML(streaming, mrEle, streamEle, doc, "mapper");
- streamEle = filterListToXML(streaming, mrEle, streamEle, doc, "reducer");
- streamEle = filterListToXML(streaming, mrEle, streamEle, doc, "record-reader");
- streamEle = filterListToXML(streaming, mrEle, streamEle, doc, "record-reader-mapping");
- streamEle = filterListToXML(streaming, mrEle, streamEle, doc, "env");
-
- // create <job-xml>
- filterListToXML(others, mrEle, doc, "job-xml");
-
- // create <configuration>
- configToXML(configs, mrEle, doc);
-
- // create <file>
- filterListToXML(others, mrEle, doc, "file");
-
- // create <archive>
- filterListToXML(others, mrEle, doc, "archive");
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
- }
-
- /**
- * Create xml element of specified tag name
- *
- * @param list list of properties
- * @param root xml element under which new elements are added
- * @param streaming streaming element
- * @param doc xml doc
- * @param key tag name
- * @return
- */
- protected Element filterListToXML(List<Property> list, Element root, Element streaming, Document doc, String key) {
-
- for (Property prop : list) {
- if (prop.getName() != null && !prop.getName().matches("\\s*") && prop.getValue() != null
- && !prop.getValue().matches("\\s*")) {
- if (prop.getName().equals(key)) {
- if (streaming == null) {
- streaming = doc.createElement("streaming");
- root.appendChild(streaming);
- }
- // create key element
- Element nameele = doc.createElement(key);
- streaming.appendChild(nameele);
-
- // create text node under created element
- Text valele = doc.createTextNode(prop.getValue());
- nameele.appendChild(valele);
- }
- }
- }
- return streaming;
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(9, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for streaming setting
- grid.setWidget(3, 0, createLabel("Streaming Setting"));
- grid.setWidget(
- 3,
- 1,
- createSubTable("Tag", "value", streaming,
- Arrays.asList("", "mapper", "reducer", "record-reader", "record-reader-mapping", "env")));
-
- // insert row for JobTracker
- jt = insertTextRow(grid, 4, "JobTracker");
-
- // insert row for NameNode
- nn = insertTextRow(grid, 5, "NameNode");
-
- // insert row for prepare
- grid.setWidget(6, 0, createLabel("Prepare"));
- grid.setWidget(6, 1, createSubTable("Operation", "Path", prepare, Arrays.asList("", "delete", "mkdir")));
-
- // insert row for Configuration
- grid.setWidget(7, 0, createLabel("Configuration"));
- grid.setWidget(7, 1, createSubTable("Property Name", "Value", configs, null));
-
- // insert row for others
- grid.setWidget(8, 0, createLabel("Others"));
- grid.setWidget(8, 1, createSubTable("Tag", "value", others, Arrays.asList("", "job-xml", "file", "archive")));
-
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/SubWFPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/SubWFPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/SubWFPropertyTable.java
deleted file mode 100644
index 90281cd..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/SubWFPropertyTable.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.Property;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.xml.client.Text;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HasVerticalAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.ListBox;
-import com.google.gwt.user.client.ui.RadioButton;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of subworkflow action
- */
-public class SubWFPropertyTable extends PropertyTable {
-
- private List<Property> configs;
- private TextBox apppath;
- private RadioButton rby;
- private RadioButton rbn;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public SubWFPropertyTable(NodeWidget w) {
- super(w);
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- protected void initConf() {
- configs = new ArrayList<Property>();
- configs.add(new Property("mapred.job.queue.name", ""));
- }
-
- /**
- * Generate xml elements of subworkflow action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <sub-workflow>
- Element subwfEle = doc.createElement("sub-workflow");
- action.appendChild(subwfEle);
-
- // create <app-path>
- subwfEle.appendChild(generateElement(doc, "app-path", apppath));
-
- // create <propagate-configuration>
- if (rby.getValue()) {
- Element proele = doc.createElement("propagate-configuration");
- subwfEle.appendChild(proele);
- }
-
- // create <configuration>
- configToXML(configs, subwfEle, doc);
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(6, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for App path
- apppath = insertTextRow(grid, 3, "App Path");
-
- // insert row for Propagate config
- grid.setWidget(4, 0, createLabel("Propagate Config"));
- HorizontalPanel radiopanel = new HorizontalPanel();
- radiopanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
- rbn = new RadioButton("propagateGroup", "false");
- rby = new RadioButton("propagateGroup", "true");
- rbn.setChecked(true);
- radiopanel.add(rby);
- radiopanel.add(rbn);
- grid.setWidget(4, 1, radiopanel);
-
- // insert row for Configuration
- grid.setWidget(5, 0, createLabel("Configuration"));
- grid.setWidget(5, 1, createSubTable("Property Name", "Value", configs, null));
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/DecisionPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/DecisionPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/DecisionPropertyTable.java
deleted file mode 100644
index 3fc780b..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/DecisionPropertyTable.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.control;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieDiagramController;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.cell.client.ButtonCell;
-import com.google.gwt.cell.client.FieldUpdater;
-import com.google.gwt.cell.client.TextCell;
-import com.google.gwt.cell.client.TextInputCell;
-import com.google.gwt.xml.client.Text;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.logical.shared.ValueChangeEvent;
-import com.google.gwt.event.logical.shared.ValueChangeHandler;
-import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.user.cellview.client.CellTable;
-import com.google.gwt.user.cellview.client.Column;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.ListBox;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.view.client.ListDataProvider;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-import com.orange.links.client.connection.Connection;
-import com.orange.links.client.shapes.DecorationShape;
-
-/**
- * Class for property table of decision node
- */
-public class DecisionPropertyTable extends PropertyTable {
-
- private Grid gridName;
- private Grid gridForm;
- private Grid gridCase;
- private List<NodeWidget> neighbors;
- private ListBox addbox;
- private TextBox predbox;
- private CheckBox defaultcheck;
- private ListDataProvider<SwitchCase> dataProvider;
- private List<SwitchCase> cases;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public DecisionPropertyTable(NodeWidget w) {
- super(w);
- initConf();
- initWidget();
- }
-
- class SwitchCase {
- private NodeWidget widget;
- private String predicate;
- private Connection connection;
-
- public SwitchCase(NodeWidget w, String p, Connection c) {
- widget = w;
- predicate = p;
- connection = c;
- }
-
- public NodeWidget getWidget() {
- return widget;
- }
-
- public String getPreDicate() {
- return predicate;
- }
-
- public void setPredicate(String s) {
- predicate = s;
- }
-
- public Connection getConnection() {
- return connection;
- }
-
- }
-
- /**
- * Initialize configuration
- */
- private void initConf() {
- neighbors = new ArrayList<NodeWidget>();
- cases = new ArrayList<SwitchCase>();
- updateWidgetDropDown();
- updateNeighborList();
- dataProvider = new ListDataProvider<SwitchCase>(cases);
- }
-
- /**
- * Update a list of node widgets that this decision node has connection to
- */
- public void updateNeighborList() {
-
- List<SwitchCase> backup = new ArrayList<SwitchCase>();
- for (SwitchCase c : cases)
- backup.add(c);
- cases.clear();
-
- OozieDiagramController controller = current.getController();
- neighbors = controller.getCurrentNeighbor(current);
- if (neighbors == null) {
- neighbors = new ArrayList<NodeWidget>();
- }
- for (NodeWidget n : neighbors) {
- Connection conn = controller.getConnection(current, n);
- SwitchCase entry = null;
-
- // check existing case
- for (SwitchCase s : backup) {
- if (s.getWidget() == n) {
- entry = s;
- break;
- }
- }
- if (entry == null) {
- entry = new SwitchCase(n, "", conn);
- }
- cases.add(entry);
- }
- }
-
- /**
- * Update a table showing a list of switch cases
- */
- public void updateNeighborTable() {
-
- dataProvider = new ListDataProvider<SwitchCase>(cases);
- gridForm.setWidget(0, 1, createAddBox());
- gridForm.setWidget(0, 4, createAddButton());
- gridCase.setWidget(0, 1, createCaseTable());
- }
-
- private ListBox createAddBox() {
- addbox = new ListBox();
- for (int i = 0; i < widgetDropDown.size(); i++) {
- NodeWidget w = widgetDropDown.get(i);
- addbox.addItem(prettyItemString(w));
- }
- return addbox;
- }
-
- /**
- * Generate xml elements of decision node and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("decision");
- action.setAttribute("name", name.getText());
- Element switchele = doc.createElement("switch");
- action.appendChild(switchele);
- for (SwitchCase ca : cases) {
- boolean isDefault = false;
- Connection conn = ca.getConnection();
- if (conn.getDecoration() != null) {
- isDefault = true;
- }
- if (isDefault) {
- Element defEle = doc.createElement("default");
- defEle.setAttribute("to", ca.getWidget().getName());
- switchele.appendChild(defEle);
- }
- else {
- Element caseEle = doc.createElement("case");
- caseEle.setAttribute("to", ca.getWidget().getName());
- Text txt = doc.createTextNode(ca.getPreDicate());
- caseEle.appendChild(txt);
- switchele.appendChild(caseEle);
- }
- }
- root.appendChild(action);
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- VerticalPanel container = new VerticalPanel();
- this.add(container);
-
- gridName = new Grid(1, 2);
- container.add(gridName);
-
- // Name Form
- name = insertTextRow(gridName, 0, "Name");
-
- // Button and TextBox to add new <case>
- gridForm = new Grid(1, 5);
- container.add(gridForm);
- gridForm.setWidget(0, 0, createLabel("Add New Case"));
- gridForm.setWidget(0, 1, createAddBox());
- predbox = new TextBox();
- gridForm.setWidget(0, 2, predbox);
- defaultcheck = new CheckBox("default");
- defaultcheck.setValue(false); // as default, <case to>
- // if <defaul> selected, make textbox for predicate read-only
- defaultcheck.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
- @Override
- public void onValueChange(ValueChangeEvent<Boolean> event) {
- if (event.getValue()) {
- predbox.setReadOnly(true);
- }
- else {
- predbox.setReadOnly(false);
- }
- }
- });
- gridForm.setWidget(0, 3, defaultcheck);
- gridForm.setWidget(0, 4, createAddButton());
-
- // Table to store list of <case>
- gridCase = new Grid(1, 2);
- container.add(gridCase);
- gridCase.setWidget(0, 0, createLabel("Switch"));
- gridCase.setWidget(0, 1, createCaseTable());
-
- }
-
- /**
- * Create a button to add a new switch case
- *
- * @return
- */
- protected Button createAddButton() {
- Button btn = new Button("add path");
- btn.getElement().setAttribute("style",
- "margin:2px;padding:0px;-webkit-border-radius:5px;-moz-border-radius:5px;-border-radius:5px;");
-
- btn.addClickHandler(new ClickHandler() {
-
- @Override
- public void onClick(ClickEvent event) {
- OozieDiagramController controller = current.getController();
- NodeWidget target = widgetDropDown.get(addbox.getSelectedIndex());
- String predicate = predbox.getText();
- Boolean isDefault = defaultcheck.getValue();
- if (!controller.isConnected(current, target)) {
- Connection conn = controller.addMultiConnection(current, target);
- if (conn == null)
- return;
- // if default checked, add decoration label to connection
- if (isDefault) {
- initializeDefault(dataProvider.getList());
- addDecorationDefaultLabel(conn);
- }
- SwitchCase newcase = new SwitchCase(target, predicate, conn);
- dataProvider.getList().add(newcase);
-
- }
- else {
- Window.alert("the case already exists!");
- }
- }
- });
-
- return btn;
- }
-
- /**
- * Create an expandable table to show switch cases
- *
- * @return
- */
- protected CellTable<SwitchCase> createCaseTable() {
-
- final CellTable<SwitchCase> table = new CellTable<SwitchCase>();
- dataProvider.addDataDisplay(table);
-
- // Add Case column
- Column<SwitchCase, String> caseCol = null;
-
- caseCol = new Column<SwitchCase, String>(new TextCell()) {
- @Override
- public String getValue(SwitchCase object) {
- return prettyItemString(object.getWidget());
- }
- };
- table.addColumn(caseCol, "To");
-
- // Add Predicate column
- Column<SwitchCase, String> predicateCol = null;
-
- predicateCol = new Column<SwitchCase, String>(new CustomTextCell()) {
- @Override
- public String getValue(SwitchCase object) {
- return object.getPreDicate();
- }
- };
-
- predicateCol.setFieldUpdater(new FieldUpdater<SwitchCase, String>() {
- @Override
- public void update(int index, SwitchCase object, String value) {
- object.setPredicate(value);
- }
- });
- table.addColumn(predicateCol, "Predicate");
-
- // Button to delete row
- Column<SwitchCase, String> defaultCol = new Column<SwitchCase, String>(new ButtonCell()) {
- @Override
- public String getValue(SwitchCase object) {
- Connection c = object.getConnection();
- DecorationShape ds = c.getDecoration();
- String rel = "Change to Default";
- if (ds != null)
- rel = "Default";
- return rel;
- }
- };
-
- defaultCol.setFieldUpdater(new FieldUpdater<SwitchCase, String>() {
-
- @Override
- public void update(int index, SwitchCase object, String value) {
- initializeDefault(dataProvider.getList());
- Connection c = object.getConnection();
- addDecorationDefaultLabel(c);
- table.redraw();
- }
- });
-
- table.addColumn(defaultCol, "");
-
- // Button to delete row
- Column<SwitchCase, String> delCol = new Column<SwitchCase, String>(new ButtonCell()) {
- @Override
- public String getValue(SwitchCase object) {
- return " - ";
- }
- };
-
- delCol.setFieldUpdater(new FieldUpdater<SwitchCase, String>() {
-
- @Override
- public void update(int index, SwitchCase object, String value) {
- dataProvider.getList().remove(index);
- OozieDiagramController controller = (OozieDiagramController) current.getGenerator()
- .getDiagramController();
- controller.removeConnection(current, object.getWidget());
- }
- });
-
- table.addColumn(delCol, "");
-
- return table;
- }
-
- class CustomTextCell extends TextInputCell {
- public void render(Context context, String data, SafeHtmlBuilder sb) {
- Connection c = ((SwitchCase) (context.getKey())).getConnection();
- if (c.getDecoration() != null) {
- sb.appendHtmlConstant("<div contentEditable='false' unselectable='true'>-----------</div>");
- }
- else {
- super.render(context, data, sb);
- }
- }
- }
-
- /**
- * Add a default label to a switch case
- *
- * @param c
- */
- public void addDecorationDefaultLabel(Connection c) {
- OozieDiagramController controller = (OozieDiagramController) current.getGenerator().getDiagramController();
- Label decorationLabel = new Label("Default");
- decorationLabel.getElement().setAttribute("style", "font-weight: bold;");
- controller.addDecoration(decorationLabel, c);
- }
-
- /**
- * Remove a default label from existing switch cases
- *
- * @param li
- */
- public void initializeDefault(List<SwitchCase> li) {
-
- OozieDiagramController controller = current.getController();
- for (SwitchCase s : li) {
- Connection c = s.getConnection();
- DecorationShape decoShape = c.getDecoration();
- if (decoShape != null) {
- controller.getView().remove(decoShape.asWidget());
- }
- c.removeDecoration();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/EndPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/EndPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/EndPropertyTable.java
deleted file mode 100644
index 76afebe..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/EndPropertyTable.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of end node
- */
-public class EndPropertyTable extends PropertyTable {
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public EndPropertyTable(NodeWidget w) {
- super(w);
- initWidget();
- }
-
- /**
- * Generate xml elements of end node and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("end");
- action.setAttribute("name", name.getText());
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(1, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- name = insertTextRow(grid, 0, "Name");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/ForkPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/ForkPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/ForkPropertyTable.java
deleted file mode 100644
index 8139508..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/ForkPropertyTable.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.control;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieDiagramController;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.cell.client.ButtonCell;
-import com.google.gwt.cell.client.FieldUpdater;
-import com.google.gwt.cell.client.TextCell;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.cellview.client.CellTable;
-import com.google.gwt.user.cellview.client.Column;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.ListBox;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.view.client.ListDataProvider;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of fork node
- */
-public class ForkPropertyTable extends PropertyTable {
-
- private Grid gridName;
- private Grid gridForm;
- private Grid gridPath;
- private List<NodeWidget> neighbors;
- private ListBox addbox;
- private ListDataProvider<NodeWidget> dataProvider;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public ForkPropertyTable(NodeWidget w) {
- super(w);
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- private void initConf() {
- neighbors = new ArrayList<NodeWidget>();
- updateWidgetDropDown();
- updateNeighborList();
- }
-
- /**
- * Update a list of node widgets that this fork node has connection to
- */
- public void updateNeighborList() {
-
- OozieDiagramController controller = current.getController();
- neighbors = controller.getCurrentNeighbor(current);
- if (neighbors == null) {
- neighbors = new ArrayList<NodeWidget>();
- }
- dataProvider = new ListDataProvider<NodeWidget>(neighbors);
- }
-
- /**
- * Update a table listing node widgets that this fork has connection to
- */
- public void updateNeighborTable() {
- gridForm.setWidget(0, 1, createAddBox());
- gridForm.setWidget(0, 2, createAddButton());
- gridPath.setWidget(0, 1, createPathTable());
- }
-
- /**
- * Create dropdown list of node widgets to create a new path
- *
- * @return
- */
- private ListBox createAddBox() {
- addbox = new ListBox();
- for (int i = 0; i < widgetDropDown.size(); i++) {
- NodeWidget w = widgetDropDown.get(i);
- addbox.addItem(prettyItemString(w));
- }
- return addbox;
- }
-
- /**
- * Generate xml elements of fork node and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("fork");
- action.setAttribute("name", name.getText());
- for (NodeWidget w : neighbors) {
- Element pathEle = doc.createElement("path");
- pathEle.setAttribute("start", w.getName());
- action.appendChild(pathEle);
- }
- root.appendChild(action);
-
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- VerticalPanel vertical = new VerticalPanel();
- this.add(vertical);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- gridName = new Grid(1, 2);
- vertical.add(gridName);
- name = insertTextRow(gridName, 0, "Name");
-
- // insert row for Add Path Input/Button
- gridForm = new Grid(1, 3);
- vertical.add(gridForm);
- gridForm.setWidget(0, 0, createLabel("Add new path"));
- gridForm.setWidget(0, 1, createAddBox());
- gridForm.setWidget(0, 2, createAddButton());
-
- // insert row for Fork Path List
- gridPath = new Grid(1, 2);
- vertical.add(gridPath);
- gridPath.setWidget(0, 0, createLabel("Path List"));
- gridPath.setWidget(0, 1, createPathTable());
- }
-
- /**
- * Create a button to add a new path
- *
- * @return
- */
- protected Button createAddButton() {
- Button btn = new Button("add");
- btn.getElement().setAttribute("style",
- "margin:2px;padding:0px;-webkit-border-radius:5px;-moz-border-radius:5px;-border-radius:5px;");
-
- btn.addClickHandler(new ClickHandler() {
-
- @Override
- public void onClick(ClickEvent event) {
- OozieDiagramController controller = (OozieDiagramController) current.getGenerator()
- .getDiagramController();
- NodeWidget w = widgetDropDown.get(addbox.getSelectedIndex());
- if (!neighbors.contains(w)) {
- dataProvider.getList().add(w);
- controller.addMultiConnection(current, w);
- }
- else {
- Window.alert("the path already exists!");
- }
- }
- });
-
- return btn;
- }
-
- /**
- * Create a expandable table listing paths that this fork node has
- *
- * @return
- */
- protected CellTable<NodeWidget> createPathTable() {
-
- CellTable<NodeWidget> table = new CellTable<NodeWidget>();
- dataProvider.addDataDisplay(table);
-
- // Add Name column
- Column<NodeWidget, String> nameCol = null;
-
- nameCol = new Column<NodeWidget, String>(new TextCell()) {
- @Override
- public String getValue(NodeWidget object) {
- return prettyItemString(object);
- }
- };
- table.addColumn(nameCol, "To");
-
- // Button to delete row
- Column<NodeWidget, String> delCol = new Column<NodeWidget, String>(new ButtonCell()) {
- @Override
- public String getValue(NodeWidget object) {
- return " - ";
- }
- };
-
- delCol.setFieldUpdater(new FieldUpdater<NodeWidget, String>() {
-
- @Override
- public void update(int index, NodeWidget object, String value) {
- List<NodeWidget> li = (List<NodeWidget>) dataProvider.getList();
- dataProvider.getList().remove(index);
- OozieDiagramController controller = current.getController();
- controller.removeConnection(current, object);
- }
- });
-
- table.addColumn(delCol, "");
-
- return table;
- }
-
- protected void display() {
- this.clear();
-
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/JoinPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/JoinPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/JoinPropertyTable.java
deleted file mode 100644
index 967d05e..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/JoinPropertyTable.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of join node
- */
-public class JoinPropertyTable extends PropertyTable {
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public JoinPropertyTable(NodeWidget w) {
- super(w);
- initWidget();
- }
-
- /**
- * Generate xml elements of join node and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("join");
- action.setAttribute("name", name.getText());
- action.setAttribute("to", next.getName());
- root.appendChild(action);
-
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(2, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/KillPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/KillPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/KillPropertyTable.java
deleted file mode 100644
index 28dbcfe..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/KillPropertyTable.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of kill node
- */
-public class KillPropertyTable extends PropertyTable {
-
- private TextBox message;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public KillPropertyTable(NodeWidget w) {
- super(w);
- initWidget();
- }
-
- /**
- * Generate xml elements of kill node and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- // create <kill>
- Element action = doc.createElement("kill");
- root.appendChild(action);
- action.setAttribute("name", name.getText());
-
- // create <message>
- action.appendChild(generateElement(doc, "message", message));
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(2, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for Message
- message = insertTextRow(grid, 1, "Message");
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/StartPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/StartPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/StartPropertyTable.java
deleted file mode 100644
index b2da80f..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/StartPropertyTable.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.control;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of start node
- */
-public class StartPropertyTable extends PropertyTable {
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public StartPropertyTable(NodeWidget w) {
- super(w);
- initWidget();
- }
-
- /**
- * Generate xml elements of start node and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- // create <start>
- Element action = doc.createElement("start");
- action.setAttribute("to", okVal.getName());
- }
-
- /**
- * Initialize widgets shown in xml doc
- */
- protected void initWidget() {
-
- grid = new Grid(1, 2);
- this.add(grid);
-
- // Start widget doesn't expose Name TextBox to users, but internally
- // keep the data.
- name = new TextBox();
- name.setText("Start Node");
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for OK
- insertOKRow(grid, 0);
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/WrkflowPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/WrkflowPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/WrkflowPropertyTable.java
deleted file mode 100644
index e096c53..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/control/WrkflowPropertyTable.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.control;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.Property;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HasHorizontalAlignment;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.ListBox;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of workflow
- */
-public class WrkflowPropertyTable extends PropertyTable {
-
- private TextBox jt;
- private TextBox nn;
- private List<Property> configs;
- private ListBox namespace;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public WrkflowPropertyTable(NodeWidget w) {
- super(w);
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- protected void initConf() {
- configs = new ArrayList<Property>();
- configs.add(new Property(" ", " "));
- }
-
- /**
- * Create a label with common format
- */
- @Override
- protected Label createLabel(String name) {
- Label label = new Label(name);
- label.setWidth("200px");
- label.setHeight("7px");
- label.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
- return label;
- }
-
- /**
- * Generate xml elements of workflow (such as global section) and attach
- * them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- if (namespace != null && namespace.getSelectedIndex() < 3) {
- return;
- }
-
- // create <global>
- Element globalEle = doc.createElement("global");
-
- // create <job-tracker>
- if (jt.getText() != null && !jt.getText().matches("\\s*")) {
- globalEle.appendChild(generateElement(doc, "job-tracker", jt));
- }
-
- // create <name-node>
- if (nn.getText() != null && !nn.getText().matches("\\s*")) {
- globalEle.appendChild(generateElement(doc, "name-node", nn));
- }
-
- // create <configuration>
- configToXML(configs, globalEle, doc);
-
- // add <global> only when child nodes exist(if not, do not put <global>)
- if (globalEle.hasChildNodes()) {
- root.appendChild(globalEle);
- }
- }
-
- /**
- * Initialize widgets shown in propery table
- */
- protected void initWidget() {
-
- grid = new Grid(5, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
- name.setText("WrkflowGeneratorDemo"); // default value
-
- // insert row for Namespace
- grid.setWidget(1, 0, createLabel("NameSpace"));
- namespace = new ListBox();
- grid.setWidget(1, 1, createNameSpaceList(namespace));
-
- // insert row for JobTracker
- jt = insertTextRow(grid, 2, "Global JobTracker");
-
- // insert row for NameNode
- nn = insertTextRow(grid, 3, "Global NameNode");
-
- // insert row for Global Configuration
- grid.setWidget(4, 0, createLabel("Global Configuration"));
- grid.setWidget(4, 1, createSubTable("Property Name", "Value", configs, null));
-
- }
-
- /**
- * Create a drop down list of name spaces
- *
- * @param b list box
- * @return
- */
- protected ListBox createNameSpaceList(ListBox b) {
- if (b == null) {
- b = new ListBox();
- }
- b.addItem("uri:oozie:workflow:0.1");
- b.addItem("uri:oozie:workflow:0.2");
- b.addItem("uri:oozie:workflow:0.3");
- b.addItem("uri:oozie:workflow:0.4");
- b.setSelectedIndex(2);
-
- return b;
- }
-
- /**
- * Return a name space
- *
- * @return name space
- */
- public String getNameSpace() {
- return namespace.getItemText(namespace.getSelectedIndex());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/NodeWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/NodeWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/NodeWidget.java
deleted file mode 100644
index 3f2ad38..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/NodeWidget.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieDiagramController;
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTableFactory;
-
-import com.google.gwt.event.dom.client.HasAllTouchHandlers;
-import com.google.gwt.event.dom.client.MouseDownEvent;
-import com.google.gwt.event.dom.client.MouseDownHandler;
-import com.google.gwt.event.dom.client.TouchCancelEvent;
-import com.google.gwt.event.dom.client.TouchCancelHandler;
-import com.google.gwt.event.dom.client.TouchEndEvent;
-import com.google.gwt.event.dom.client.TouchEndHandler;
-import com.google.gwt.event.dom.client.TouchMoveEvent;
-import com.google.gwt.event.dom.client.TouchMoveHandler;
-import com.google.gwt.event.dom.client.TouchStartEvent;
-import com.google.gwt.event.dom.client.TouchStartHandler;
-import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.MenuItem;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-import com.orange.links.client.menu.ContextMenu;
-import com.orange.links.client.menu.HasContextMenu;
-import com.orange.links.client.save.IsDiagramSerializable;
-
-/**
- * Abstract class used as base for node widget
- */
-public abstract class NodeWidget extends Label implements HasContextMenu, HasAllTouchHandlers, IsDiagramSerializable {
-
- protected ContextMenu contextMenu;
- protected OozieWorkflowGenerator generator;
- protected OozieDiagramController controller;
- protected PropertyTable table;
- protected boolean visited = false;
- protected String identifier = "nodewidget"; // for serialization to be
- // implemented
- protected String content = ""; // for serialization to be implemented
-
- public NodeWidget() {
- super("");
- initMenu();
- initEvent();
- }
-
- /**
- * Constructor which records OozieWorkflowGenerator
- *
- * @param gen OozieWorkflowGenerator
- */
- public NodeWidget(OozieWorkflowGenerator gen, String style) {
- this();
- generator = gen;
- controller = gen.getDiagramController();
- setStyleName(style);
- initPropertyTable();
- }
-
- /**
- * Initialize property table
- */
- protected void initPropertyTable() {
- PropertyTableFactory factory = PropertyTableFactory.getInstance();
- table = factory.createPropertyTable(this);
- generator.setPropertyTable(table);
- }
-
- /**
- * Initialize right-click context menu
- */
- protected void initMenu() {
- contextMenu = new ContextMenu();
- contextMenu.addItem(new MenuItem("Delete", new Command() {
- @Override
- public void execute() {
- generator.removeWidget(NodeWidget.this);
- }
- }));
- }
-
- /**
- * Initialize event handler
- */
- protected void initEvent() {
-
- // Register MouseDown Event to update property table of the selected
- // action
- this.addMouseDownHandler(new MouseDownHandler() {
-
- @Override
- public void onMouseDown(MouseDownEvent event) {
- generator.setPropertyTable(table);
- updateOnSelection();
- }
- });
- }
-
- /**
- * Update information when clicked in workflow design panel
- */
- protected abstract void updateOnSelection();
-
- /**
- * Return an instance of OozieWorkflowGenerator
- *
- * @return
- */
- public OozieWorkflowGenerator getGenerator() {
- return this.generator;
- }
-
- /**
- * Return an instance of property table
- *
- * @return Property Tab
- */
- public PropertyTable getPropertyTable() {
- return this.table;
- }
-
- /**
- * Return an instance of OozieDiagramController
- *
- * @return
- */
- public OozieDiagramController getController() {
- return this.controller;
- }
-
- /**
- * Return a name of node widget
- *
- * @return
- */
- public String getName() {
- return table.getName();
- }
-
- /**
- * Set a name of node widget
- *
- * @param n name
- */
- public void setName(String n) {
- table.setName(n);
- }
-
- /**
- * Generate xml elements of this node widget and attach them to xml doc
- *
- * @param doc xml document
- * @param root xml element under which elements of this node widget are
- * added
- * @param next next node widget to be executed after this in workflow
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
- table.generateXML(doc, root, next);
- }
-
- /**
- * Add TouchStartHandler
- */
- @Override
- public HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
- return addDomHandler(handler, TouchStartEvent.getType());
- }
-
- /**
- * Add TouchEndHandler
- */
- @Override
- public HandlerRegistration addTouchEndHandler(TouchEndHandler handler) {
- return addDomHandler(handler, TouchEndEvent.getType());
- }
-
- /**
- * Add TouchMoveHandler
- */
- @Override
- public HandlerRegistration addTouchMoveHandler(TouchMoveHandler handler) {
- return addDomHandler(handler, TouchMoveEvent.getType());
- }
-
- /**
- * Add TouchCancelHandler
- */
- @Override
- public HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler) {
- return addDomHandler(handler, TouchCancelEvent.getType());
- }
-
- /**
- * Return a type of node widget (used for serialization not yet implemented)
- */
- @Override
- public String getType() {
- return this.identifier;
- }
-
- /**
- * Return content representation of node widget (used for serialization not
- * yet implemented)
- */
- @Override
- public String getContentRepresentation() {
- return this.content;
- }
-
- /**
- * Set content representation of node widget (used for serialization not yet
- * implemented)
- */
- @Override
- public void setContentRepresentation(String contentRepresentation) {
- this.content = contentRepresentation;
- }
-
- /**
- * Return right-click context menu
- */
- @Override
- public ContextMenu getContextMenu() {
- return this.contextMenu;
- }
-
- /**
- * Return if node widget is already visited in tree-traversal algorithm
- * which generates xml
- *
- * @return
- */
- public boolean isVisited() {
- return this.visited;
- }
-
- /**
- * Set flag when node widget is visited in tree-traversal algorithm which
- * generates xml
- */
- public void visit() {
- this.visited = true;
- }
-
- /**
- * Initialize visited flag
- */
- public void unvisit() {
- this.visited = false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/EmailActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/EmailActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/EmailActionWidget.java
deleted file mode 100644
index 032a0a1..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/EmailActionWidget.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of email action
- */
-public class EmailActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public EmailActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-EmailActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/FSActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/FSActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/FSActionWidget.java
deleted file mode 100644
index 76e2783..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/FSActionWidget.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of fs action
- */
-public class FSActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public FSActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-FSActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/JavaActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/JavaActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/JavaActionWidget.java
deleted file mode 100644
index 2cafaec..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/JavaActionWidget.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of java action
- */
-public class JavaActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public JavaActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-JavaActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/MapReduceActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/MapReduceActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/MapReduceActionWidget.java
deleted file mode 100644
index 572e59b..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/MapReduceActionWidget.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of MR action
- */
-public class MapReduceActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public MapReduceActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-MapReduceActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/PigActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/PigActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/PigActionWidget.java
deleted file mode 100644
index 9fa5710..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/PigActionWidget.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of pig action
- */
-public class PigActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public PigActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-PigActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/PipesActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/PipesActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/PipesActionWidget.java
deleted file mode 100644
index 868cb51..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/PipesActionWidget.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of MR pipes action
- */
-public class PipesActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public PipesActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-PipesActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/SSHActionWidget.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/SSHActionWidget.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/SSHActionWidget.java
deleted file mode 100644
index bdeb0de..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/widget/action/SSHActionWidget.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.widget.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-/**
- * Class for node widget of SSH action
- */
-public class SSHActionWidget extends NodeWidget {
-
- /**
- * Constructor which records oozie workflow generator and initializes
- * property table
- *
- * @param gen oozieWorkflowGenerator
- */
- public SSHActionWidget(OozieWorkflowGenerator gen) {
- super(gen, "oozie-SSHActionWidget");
- }
-
- /**
- * Update current lists of created node widgets when clicked in workflow
- * design panel
- */
- @Override
- public void updateOnSelection() {
- table.updateWidgetDropDown();
- table.updateErrorDropDown();
- }
-}
[3/4] oozie git commit: OOZIE-2625 Drop workflowgenerator (rkanter)
Posted by rk...@apache.org.
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/PropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/PropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/PropertyTable.java
deleted file mode 100644
index 9734c7a..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/PropertyTable.java
+++ /dev/null
@@ -1,620 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.oozie.tools.workflowgenerator.client.OozieDiagramController;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.EmailActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.FSActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.JavaActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.MapReduceActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.PigActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.PipesActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.SSHActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.ShellActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.StreamingActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.SubWFActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.DecisionNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.EndNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.ForkNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.JoinNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.KillNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.StartNodeWidget;
-import com.google.gwt.cell.client.ButtonCell;
-import com.google.gwt.cell.client.FieldUpdater;
-import com.google.gwt.cell.client.SelectionCell;
-import com.google.gwt.cell.client.TextInputCell;
-import com.google.gwt.event.dom.client.ChangeEvent;
-import com.google.gwt.event.dom.client.ChangeHandler;
-import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.user.cellview.client.CellTable;
-import com.google.gwt.user.cellview.client.Column;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HasHorizontalAlignment;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.ListBox;
-import com.google.gwt.user.client.ui.ScrollPanel;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.view.client.ListDataProvider;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-import com.google.gwt.xml.client.Text;
-
-/**
- * Base abstract class for property table;
- */
-public abstract class PropertyTable extends ScrollPanel {
-
- protected NodeWidget current;
- protected TextBox name;
- protected ListBox okVal;
- protected ListBox errorVal;
- protected TextBox jt;
- protected TextBox nn;
- protected List<NodeWidget> widgetDropDown;
- protected HandlerRegistration handler;
- protected Grid grid;
-
- /**
- * Constructor which records node widget
- *
- * @param w node widget
- */
- public PropertyTable(NodeWidget w) {
- super();
- this.current = w;
- }
-
- /**
- * Update a list of other node widgets shown in "OK" drop-down, excluding
- * start and kill nodes
- */
- public void updateWidgetDropDown() {
-
- List<NodeWidget> widgetList = current.getGenerator().getWidgets();
- OozieDiagramController controller = current.getController();
-
- if (widgetDropDown == null) {
- widgetDropDown = new ArrayList<NodeWidget>();
- }
- else {
- widgetDropDown.clear();
- }
-
- if (widgetList != null) {
- for (NodeWidget w : widgetList) {
- if (!(w instanceof KillNodeWidget) && !(w instanceof StartNodeWidget) && w != current) {
- widgetDropDown.add(w);
- }
- }
- }
-
- // if okVal listbox doesn't exist, return
- if (okVal != null) {
- okVal.clear();
- }
- else {
- return;
- }
- // insert empty option on top
- okVal.addItem("");
-
- for (int i = 0; i < widgetDropDown.size(); i++) {
- NodeWidget w = widgetDropDown.get(i);
- okVal.addItem(prettyItemString(w));
- // option selected when this node widget is connected to the
- // widget in a design panel
- List<NodeWidget> neigh = controller.getCurrentNeighbor(current);
- if (neigh != null && neigh.size() > 0 && w == neigh.get(0))
- okVal.setSelectedIndex(i + 1);
- }
-
- // remove previous handler, otherwise, end up having multiple handlers
- if (handler != null) {
- handler.removeHandler();
- }
-
- handler = okVal.addChangeHandler(new ChangeHandler() {
- @Override
- public void onChange(ChangeEvent event) {
- int selectedIndex = okVal.getSelectedIndex();
- if (selectedIndex > 0) {
- NodeWidget target = widgetDropDown.get(selectedIndex - 1);
- current.getController().addConnection(current, target);
- }
-
- }
- });
- }
-
- /**
- * Update "Error" drop-down list, currently only includes default kill node
- */
- public void updateErrorDropDown() {
-
- List<NodeWidget> widgetList = current.getGenerator().getWidgets();
-
- if (errorVal == null) {
- errorVal = new ListBox();
- }
- else {
- errorVal.clear();
- }
-
- for (NodeWidget w : widgetList) {
- if (w instanceof KillNodeWidget) {
- errorVal.addItem(prettyItemString(w));
- errorVal.setSelectedIndex(0);
- }
- }
- }
-
- /**
- * Return an instance of a kill node
- *
- * @return
- */
- protected NodeWidget getKillNode() {
-
- List<NodeWidget> widgetList = current.getGenerator().getWidgets();
- NodeWidget node = null;
- for (NodeWidget w : widgetList) {
- if (w instanceof KillNodeWidget)
- node = w;
- }
- return node;
- }
-
- /**
- * Abstract method to generate xml elements and attach them to xml doc
- *
- * @param doc xml document
- * @param root xml element under which generated xml elements are added
- * @param next next node widget to be executed after this in workflow
- */
- public abstract void generateXML(Document doc, Element root, NodeWidget next);
-
- /**
- * Append a type of the node widget to its name for readability
- *
- * @param w
- * @return
- */
- protected String prettyItemString(NodeWidget w) {
- StringBuilder s = new StringBuilder();
- s.append(w.getName());
- s.append(" ");
- if (w instanceof EndNodeWidget) {
- s.append(" (End Node)");
- }
- else if (w instanceof ForkNodeWidget) {
- s.append(" (Fork Node)");
- }
- else if (w instanceof JoinNodeWidget) {
- s.append(" (Join Node)");
- }
- else if (w instanceof MapReduceActionWidget) {
- s.append(" (MR Action)");
- }
- else if (w instanceof PigActionWidget) {
- s.append(" (Pig Action)");
- }
- else if (w instanceof StreamingActionWidget) {
- s.append(" (MR Streaming Action)");
- }
- else if (w instanceof PipesActionWidget) {
- s.append(" (MR Pipes Action)");
- }
- else if (w instanceof JavaActionWidget) {
- s.append(" (Java Action)");
- }
- else if (w instanceof FSActionWidget) {
- s.append(" (FS Action)");
- }
- else if (w instanceof DecisionNodeWidget) {
- s.append(" (Decision Node)");
- }
- else if (w instanceof KillNodeWidget) {
- s.append(" (Kill Node)");
- }
- else if (w instanceof SSHActionWidget) {
- s.append(" (SSH Node)");
- }
- else if (w instanceof SubWFActionWidget) {
- s.append(" (SubWF Node)");
- }
- else if (w instanceof EmailActionWidget) {
- s.append(" (Email Node)");
- }
- else if (w instanceof ShellActionWidget) {
- s.append(" (Shell Node)");
- }
- return s.toString();
- }
-
- /**
- * Set the width of widget
- *
- * @param w widget
- * @return
- */
- protected Widget formatCell(Widget w) {
- w.setWidth("300px");
- return w;
- }
-
- /**
- * Create an expandable sub table as a part of property table
- *
- * @param colname1 1st column name
- * @param colname2 2nd column name
- * @param data data list
- * @param options listbox options, if null, text input cell used
- * @return
- */
- protected CellTable<Property> createSubTable(String colname1, String colname2, List<Property> data,
- List<String> options) {
-
- final CellTable<Property> table = new CellTable<Property>();
- final ListDataProvider<Property> dataProvider = new ListDataProvider<Property>();
- dataProvider.setList(data);
- dataProvider.addDataDisplay(table);
-
- // add Name column
- Column<Property, String> nameCol = null;
-
- if (options == null) {
- nameCol = new Column<Property, String>(new TextInputCell()) {
- @Override
- public String getValue(Property object) {
- return object.getName();
- }
- };
- }
- else {
- nameCol = new Column<Property, String>(new SelectionCell(options)) {
- @Override
- public String getValue(Property object) {
- return object.getName();
- }
- };
- }
-
- // set event for updating value
- nameCol.setFieldUpdater(new FieldUpdater<Property, String>() {
- @Override
- public void update(int index, Property object, String value) {
- object.setName(value);
- }
- });
- table.addColumn(nameCol, colname1);
-
- // Add Value column
- Column<Property, String> valueCol = new Column<Property, String>(new TextInputCell()) {
- @Override
- public String getValue(Property object) {
- return object.getValue();
- }
- };
-
- valueCol.setFieldUpdater(new FieldUpdater<Property, String>() {
- @Override
- public void update(int index, Property object, String value) {
- object.setValue(value);
- }
- });
- table.addColumn(valueCol, colname2);
-
- // Button to add row
- Column<Property, String> addCol = new Column<Property, String>(new ButtonCell()) {
- @Override
- public String getValue(Property object) {
- return " + ";
- }
- };
- addCol.setFieldUpdater(new FieldUpdater<Property, String>() {
- @Override
- public void update(int index, Property object, String value) {
- dataProvider.getList().add(index + 1, new Property("", ""));
- }
- });
-
- table.addColumn(addCol, "");
-
- // Button to delete row
- Column<Property, String> delCol = new Column<Property, String>(new ButtonCell()) {
- @Override
- public String getValue(Property object) {
- return " - ";
- }
- };
-
- delCol.setFieldUpdater(new FieldUpdater<Property, String>() {
-
- @Override
- public void update(int index, Property object, String value) {
- List<Property> li = dataProvider.getList();
- if (li.size() == 1) {
- Property p = li.get(0);
- p.setName("");
- p.setValue("");
- table.redraw();
- }
- else
- dataProvider.getList().remove(index);
- }
- });
-
- table.addColumn(delCol, "");
-
- return table;
- }
-
- /**
- * Create an add button in a table
- *
- * @param table
- * @return
- */
- protected Button createAddButton(Grid table) {
- Button btn = new Button("+");
- btn.getElement()
- .setAttribute("style",
- "font-size:20px;margin:0px;padding:0px;-webkit-border-radius:10px;-moz-border-radius:10px;-border-radius:10px;");
- return btn;
- }
-
- /**
- * create a delete button in a table
- *
- * @param table
- * @return
- */
- protected Button createDelButton(Grid table) {
- Button btn = new Button("-");
- btn.getElement()
- .setAttribute("style",
- "font-size:20px;margin:0px;padding:0px;-webkit-border-radius:10px;-moz-border-radius:10px;-border-radius:10px;");
- return btn;
- }
-
- /**
- * Create a label with common format
- *
- * @param name
- * @return
- */
- protected Label createLabel(String name) {
- Label label = new Label(name);
- label.setWidth("100px");
- label.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
- return label;
- }
-
- /**
- * Generate xml elements of configuration
- *
- * @param list List of properties
- * @param root xml element under which configuration tag is added
- * @param doc xml document
- */
- protected void configToXML(List<Property> list, Element root, Document doc) {
-
- Element confEle = null;
-
- for (Property prop : list) {
- if (prop.getName() != null && !prop.getName().matches("\\s*") && prop.getValue() != null
- && !prop.getValue().matches("\\s*")) {
-
- if (confEle == null) {
- confEle = doc.createElement("configuration");
- root.appendChild(confEle);
- }
-
- // create <property>
- Element propEle = doc.createElement("property");
- confEle.appendChild(propEle);
-
- // create <name>
- Element nameEle = doc.createElement("name");
- propEle.appendChild(nameEle);
- nameEle.appendChild(doc.createTextNode(prop.getName()));
-
- // create <value>
- Element valEle = doc.createElement("value");
- propEle.appendChild(valEle);
- valEle.appendChild(doc.createTextNode(prop.getValue()));
- }
- }
-
- }
-
- /**
- * Generate xml elements of prepare tag
- *
- * @param list list of properties
- * @param root xml element under which prepare tag is added
- * @param doc xml document
- */
- protected void prepareToXML(List<Property> list, Element root, Document doc) {
-
- Element prepareEle = null;
- for (Property prop : list) {
- if (prop.getName() != null && !prop.getName().matches("\\s*") && prop.getValue() != null
- && !prop.getValue().matches("\\s*")) {
-
- if (prepareEle == null) {
- prepareEle = doc.createElement("prepare");
- root.appendChild(prepareEle);
- }
-
- // create <delete> or <mkdir>
- Element ele = null;
- if (prop.getName().equals("delete")) {
- ele = doc.createElement("delete");
- }
- else if (prop.getName().equals("mkdir")) {
- ele = doc.createElement("mkdir");
- }
- ele.setAttribute("path", prop.getValue());
- prepareEle.appendChild(ele);
- }
- }
- }
-
- /**
- * Generate xml elements of specified tag name
- *
- * @param list list of properties
- * @param root xml element under which new elements are added
- * @param doc xml document
- * @param key tag name
- */
- protected void filterListToXML(List<Property> list, Element root, Document doc, String key) {
-
- for (Property prop : list) {
- if (prop.getName() != null && !prop.getName().matches("\\s*") && prop.getValue() != null
- && !prop.getValue().matches("\\s*")) {
- if (prop.getName().equals(key)) {
- // create key element
- Element nameEle = doc.createElement(key);
- root.appendChild(nameEle);
-
- // create text node under created element
- Text valEle = doc.createTextNode(prop.getValue());
- nameEle.appendChild(valEle);
- }
- }
- }
- }
-
- /**
- * Generate xml element of specific tag using content of textbox
- *
- * @param doc xml document
- * @param tag tag name
- * @param box textbox
- * @return
- */
- protected Element generateElement(Document doc, String tag, TextBox box) {
- Element ele = doc.createElement(tag);
- Text t = doc.createTextNode(box.getText());
- ele.appendChild(t);
- return ele;
- }
-
- /**
- * Generate xml element of ok
- *
- * @param doc xml document
- * @param next next node widget to be executed after this in workflow
- * @return
- */
- protected Element generateOKElement(Document doc, NodeWidget next) {
- Element okEle = doc.createElement("ok");
- okEle.setAttribute("to", next.getName());
- return okEle;
- }
-
- /**
- * Generate xml element of error
- *
- * @param doc xml document
- * @return
- */
- protected Element generateErrorElement(Document doc) {
- Element errEle = doc.createElement("error");
- NodeWidget kill = getKillNode();
- errEle.setAttribute("to", kill == null ? "" : kill.getName());
- return errEle;
- }
-
- /**
- * Insert a row with textbox into a grid table
- *
- * @param grid grid table
- * @param row row number
- * @param label name of label
- * @return
- */
- protected TextBox insertTextRow(Grid grid, int row, String label) {
- grid.setWidget(row, 0, createLabel(label));
- TextBox box = new TextBox();
- grid.setWidget(row, 1, formatCell(box));
- return box;
- }
-
- /**
- * Insert a row for ok into a grid table
- *
- * @param grid grid table
- * @param row row number
- */
- protected void insertOKRow(Grid grid, int row) {
- grid.setWidget(row, 0, createLabel("OK"));
- okVal = new ListBox();
- updateWidgetDropDown();
- grid.setWidget(row, 1, formatCell(okVal));
- }
-
- /**
- * Insert a row for error into a grid table
- *
- * @param grid grid table
- * @param row row number
- */
- protected void insertErrorRow(Grid grid, int row) {
- grid.setWidget(row, 0, createLabel("Error"));
- errorVal = new ListBox();
- updateErrorDropDown();
- grid.setWidget(row, 1, formatCell(errorVal));
- }
-
- /**
- * Return a name of the node widget
- *
- * @return
- */
- public String getName() {
- String n = null;
- if (name != null) {
- n = name.getText();
- }
- else {
- n = new String("");
- }
- return n;
- }
-
- /**
- * Set a name of the node widget
- *
- * @param n
- */
- public void setName(String n) {
- if (name != null) {
- name.setText(n);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/PropertyTableFactory.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/PropertyTableFactory.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/PropertyTableFactory.java
deleted file mode 100644
index 1e2608b..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/PropertyTableFactory.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.action.EmailPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.FSPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.JavaPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.MapReducePropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.PigPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.PipesPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.SSHPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.ShellPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.StreamingPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.action.SubWFPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.DecisionPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.EndPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.ForkPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.JoinPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.KillPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.StartPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.EmailActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.FSActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.JavaActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.MapReduceActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.PigActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.PipesActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.SSHActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.ShellActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.StreamingActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.SubWFActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.DecisionNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.EndNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.ForkNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.JoinNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.KillNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.StartNodeWidget;
-
-/**
- * Singleton class to instantiate property table corresponding to node widget.
- */
-public class PropertyTableFactory {
-
- // Singleton
- private static PropertyTableFactory factory = new PropertyTableFactory();
-
- private PropertyTableFactory() {
- }
-
- /**
- * Return PropertyTableFactory instance
- *
- * @return PropertyTableFactory
- */
- public static PropertyTableFactory getInstance() {
- return factory;
- }
-
- /**
- * Return property table instance corresponding to node widget given in an
- * argument
- *
- * @param w node widget
- * @return PropertyTable
- */
- public PropertyTable createPropertyTable(NodeWidget w) {
-
- PropertyTable table = null;
-
- if (w instanceof MapReduceActionWidget) {
- table = new MapReducePropertyTable(w);
- }
- else if (w instanceof PigActionWidget) {
- table = new PigPropertyTable(w);
- }
- else if (w instanceof JavaActionWidget) {
- table = new JavaPropertyTable(w);
- }
- else if (w instanceof FSActionWidget) {
- table = new FSPropertyTable(w);
- }
- else if (w instanceof PipesActionWidget) {
- table = new PipesPropertyTable(w);
- }
- else if (w instanceof StreamingActionWidget) {
- table = new StreamingPropertyTable(w);
- }
- else if (w instanceof ShellActionWidget) {
- table = new ShellPropertyTable(w);
- }
- else if (w instanceof SSHActionWidget) {
- table = new SSHPropertyTable(w);
- }
- else if (w instanceof EmailActionWidget) {
- table = new EmailPropertyTable(w);
- }
- else if (w instanceof SubWFActionWidget) {
- table = new SubWFPropertyTable(w);
- }
- else if (w instanceof StartNodeWidget) {
- table = new StartPropertyTable(w);
- }
- else if (w instanceof EndNodeWidget) {
- table = new EndPropertyTable(w);
- }
- else if (w instanceof KillNodeWidget) {
- table = new KillPropertyTable(w);
- }
- else if (w instanceof ForkNodeWidget) {
- table = new ForkPropertyTable(w);
- }
- else if (w instanceof JoinNodeWidget) {
- table = new JoinPropertyTable(w);
- }
- else if (w instanceof DecisionNodeWidget) {
- table = new DecisionPropertyTable(w);
- }
-
- return table;
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/EmailPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/EmailPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/EmailPropertyTable.java
deleted file mode 100644
index 2bcdc12..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/EmailPropertyTable.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of email action
- */
-public class EmailPropertyTable extends PropertyTable {
-
- private TextBox to;
- private TextBox cc;
- private TextBox subject;
- private TextBox body;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public EmailPropertyTable(NodeWidget w) {
- super(w);
- initWidget();
- }
-
- /**
- * Generate xml elements of email action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <email>
- Element emailEle = doc.createElement("email");
- action.appendChild(emailEle);
-
- // create <to>
- emailEle.appendChild(generateElement(doc, "to", to));
-
- // create <cc>
- emailEle.appendChild(generateElement(doc, "cc", cc));
-
- // create <subject>
- emailEle.appendChild(generateElement(doc, "subject", subject));
-
- // create <body>
- emailEle.appendChild(generateElement(doc, "body", body));
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(7, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for TO
- to = insertTextRow(grid, 3, "To");
-
- // insert row for CC
- cc = insertTextRow(grid, 4, "CC");
-
- // insert row for Subject
- subject = insertTextRow(grid, 5, "Subject");
-
- // insert row for Body
- body = insertTextRow(grid, 6, "Body");
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/FSPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/FSPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/FSPropertyTable.java
deleted file mode 100644
index a0b23a4..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/FSPropertyTable.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.cell.client.ButtonCell;
-import com.google.gwt.cell.client.FieldUpdater;
-import com.google.gwt.cell.client.SelectionCell;
-import com.google.gwt.cell.client.TextCell;
-import com.google.gwt.cell.client.Cell.Context;
-import com.google.gwt.cell.client.TextInputCell;
-import com.google.gwt.safehtml.shared.SafeHtml;
-import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.user.cellview.client.CellTable;
-import com.google.gwt.user.cellview.client.Column;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.view.client.ListDataProvider;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of FS action
- */
-public class FSPropertyTable extends PropertyTable {
-
- private List<FSActionData> fsdata;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w
- */
- public FSPropertyTable(NodeWidget w) {
- super(w);
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- private void initConf() {
- fsdata = new ArrayList<FSActionData>();
- fsdata.add(new FSActionData());
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- VerticalPanel vertical = new VerticalPanel();
- this.add(vertical);
- grid = new Grid(3, 2);
- vertical.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // create cell table for FS operation
- vertical.add(createFSActionTable(fsdata));
- }
-
- /**
- * Create a table showing fs operations
- *
- * @param data
- * @return
- */
- protected CellTable<FSActionData> createFSActionTable(List<FSActionData> data) {
-
- final CellTable<FSActionData> table = new CellTable<FSActionData>();
- final ListDataProvider<FSActionData> dataProvider = new ListDataProvider<FSActionData>();
- dataProvider.setList(data);
- dataProvider.addDataDisplay(table);
-
- // Add Name column
- Column<FSActionData, String> nameCol = null;
-
- nameCol = new Column<FSActionData, String>(new SelectionCell(Arrays.asList("", "delete", "mkdir", "move",
- "chmod", "touchz"))) {
- @Override
- public String getValue(FSActionData object) {
- return object.getOp();
- }
- };
-
- // set event for updating value
- nameCol.setFieldUpdater(new FieldUpdater<FSActionData, String>() {
- @Override
- public void update(int index, FSActionData object, String value) {
- FSActionData d = dataProvider.getList().get(index);
- d.setOp(value);
- table.redraw();
- }
- });
- table.addColumn(nameCol, "operation");
-
- Column<FSActionData, String> label1Col = new Column<FSActionData, String>(new TextCell()) {
- @Override
- public String getValue(FSActionData object) {
- String rel = "Path";
- String op = object.getOp();
- if (op.equals("move")) {
- rel = "Source Path";
- }
- return rel;
- }
- };
-
- table.addColumn(label1Col);
-
- // Add Column for 1st parameter of delete/mkdir/chmod/move/touchz
- Column<FSActionData, String> param1Col = new Column<FSActionData, String>(new TextInputCell()) {
- @Override
- public String getValue(FSActionData object) {
- String op = object.getOp();
- if (op.equals("delete") || op.equals("mkdir") || op.equals("chmod") || op.equals("touchz")) {
- if (object.getParams().containsKey("path") && object.getParams().get("path") != null)
- return object.getParams().get("path");
- }
- else if (op.equals("move")) {
- if (object.getParams().containsKey("source") && object.getParams().get("source") != null)
- return object.getParams().get("source");
- }
- return "";
- }
- };
-
- param1Col.setFieldUpdater(new FieldUpdater<FSActionData, String>() {
- @Override
- public void update(int index, FSActionData object, String value) {
- FSActionData d = dataProvider.getList().get(index);
- String op = d.getOp();
- if (op.equals("delete") || op.equals("mkdir") || op.equals("chmod") || op.equals("touchz")) {
- d.getParams().put("path", value);
- }
- else if (op.equals("move")) {
- d.getParams().put("source", value);
- }
- }
- });
- table.addColumn(param1Col, "");
-
- // Add Label for 2rd parameter of move and chmod
- Column<FSActionData, String> label2Col = new Column<FSActionData, String>(new TextCell()) {
-
- public void render(Context context, SafeHtml value, SafeHtmlBuilder sb) {
- if (value != null) {
- FSActionData data = (FSActionData) context.getKey();
- if (data.getOp().equals("move") || data.getOp().equals("chmod"))
- sb.append(value);
- }
- }
-
- @Override
- public String getValue(FSActionData object) {
- String rel = null;
- String op = object.getOp();
- if (op.equals("move")) {
- rel = "Target Path";
- }
- else if (op.equals("chmod")) {
- rel = "Permissions";
- }
- return rel;
- }
- };
-
- table.addColumn(label2Col);
-
- // Add Column for 2nd parameter of move and chmod
- Column<FSActionData, String> param2Col = new Column<FSActionData, String>(new CustomEditTextCell()) {
- @Override
- public String getValue(FSActionData object) {
- String op = object.getOp();
- if (op.equals("move")) {
- if (object.getParams().containsKey("target") && object.getParams().get("target") != null)
- return object.getParams().get("target");
- }
- else if (op.equals("chmod")) {
- if (object.getParams().containsKey("permissions") && object.getParams().get("permissions") != null)
- return object.getParams().get("permissions");
- }
- return "";
- }
- };
-
- param2Col.setFieldUpdater(new FieldUpdater<FSActionData, String>() {
- @Override
- public void update(int index, FSActionData object, String value) {
- FSActionData d = dataProvider.getList().get(index);
- String op = d.getOp();
- if (op.equals("move")) {
- d.getParams().put("target", value);
- }
- else if (op.equals("chmod")) {
- d.getParams().put("permissions", value);
- }
- }
- });
- table.addColumn(param2Col, "");
-
- // Add Label for 3rd parameter of chmod
- Column<FSActionData, String> label3Col = new Column<FSActionData, String>(new TextCell()) {
-
- public void render(Context context, SafeHtml value, SafeHtmlBuilder sb) {
- if (value != null) {
- FSActionData data = (FSActionData) context.getKey();
- if (data.getOp().equals("chmod"))
- sb.append(value);
- }
- }
-
- @Override
- public String getValue(FSActionData object) {
- String rel = null;
- String op = object.getOp();
- if (op.equals("chmod"))
- rel = "Chmod files within directory?(dir-files)";
- return rel;
- }
- };
-
- table.addColumn(label3Col);
-
- // Add Column for 3rd parameter of chmod
- // ( Recursive option not implemented in this version. need to add
- // another column for that. )
- Column<FSActionData, String> param3Col = new Column<FSActionData, String>(new CustomSelectionCell(
- Arrays.asList("true", "false"))) {
- @Override
- public String getValue(FSActionData object) {
- String rel = null;
- String op = object.getOp();
- if (op.equals("chmod"))
- rel = object.getParams().get("dir-files");
- return rel;
- }
- };
-
- param3Col.setFieldUpdater(new FieldUpdater<FSActionData, String>() {
- @Override
- public void update(int index, FSActionData object, String value) {
- FSActionData d = dataProvider.getList().get(index);
- String op = d.getOp();
- if (op.equals("chmod")) {
- d.getParams().put("dir-files", value);
- }
- }
- });
- table.addColumn(param3Col, "");
-
- // Button to add row
- Column<FSActionData, String> addCol = new Column<FSActionData, String>(new ButtonCell()) {
- @Override
- public String getValue(FSActionData object) {
- return " + ";
- }
- };
- addCol.setFieldUpdater(new FieldUpdater<FSActionData, String>() {
- @Override
- public void update(int index, FSActionData object, String value) {
- dataProvider.getList().add(index + 1, new FSActionData());
- }
- });
-
- table.addColumn(addCol, "");
-
- // Button to delete row
- Column<FSActionData, String> delCol = new Column<FSActionData, String>(new ButtonCell()) {
- @Override
- public String getValue(FSActionData object) {
- return " - ";
- }
- };
-
- delCol.setFieldUpdater(new FieldUpdater<FSActionData, String>() {
-
- @Override
- public void update(int index, FSActionData object, String value) {
- List<FSActionData> li = dataProvider.getList();
- if (li.size() == 1) {
- FSActionData p = li.get(0);
- p.clear();
- table.redraw();
- }
- else {
- dataProvider.getList().remove(index);
- }
- }
- });
-
- table.addColumn(delCol, "");
-
- return table;
- }
-
- class CustomEditTextCell extends TextInputCell {
-
- @Override
- public void render(Context context, String value, SafeHtmlBuilder sb) {
- FSActionData fsdata = (FSActionData) context.getKey();
- String op = fsdata.getOp();
- if (op.equals("move") || op.equals("chmod"))
- super.render(context, value, sb);
-
- }
- }
-
- class CustomSelectionCell extends SelectionCell {
-
- public CustomSelectionCell(List<String> options) {
- super(options);
- }
-
- @Override
- public void render(Context context, String value, SafeHtmlBuilder sb) {
- FSActionData fsdata = (FSActionData) context.getKey();
- String op = fsdata.getOp();
- if (op.equals("chmod")) {
- super.render(context, value, sb);
- }
- }
- }
-
- /**
- * Generate xml elements of fs action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- Element fsEle = doc.createElement("fs");
- action.appendChild(fsEle);
-
- // create <delete>
- fsDataListToXML(fsdata, fsEle, doc, "delete");
-
- // create <mkdir>
- fsDataListToXML(fsdata, fsEle, doc, "mkdir");
-
- // create <move>
- fsDataListToXML(fsdata, fsEle, doc, "move");
-
- // create <chmod>
- fsDataListToXML(fsdata, fsEle, doc, "chmod");
-
- // create <touchz>
- fsDataListToXML(fsdata, fsEle, doc, "touchz");
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
-
- }
-
- /**
- * Generate xml elements of fs operations
- *
- * @param list list of FS operations
- * @param root xml element under which fs action is added
- * @param doc xml document
- * @param key name of fs operation
- */
- protected void fsDataListToXML(List<FSActionData> list, Element root, Document doc, String key) {
-
- for (FSActionData fsdata : list) {
- String op = fsdata.getOp();
-
- if (op != null && !op.matches("\\s*") && op.equals(key)) {
-
- Map<String, String> params = fsdata.getParams();
-
- boolean flag = true;
- if (op.equals("delete") && !params.containsKey("path")) {
- flag = false;
- }
- else if (op.equals("mkdir") && !params.containsKey("path")) {
- flag = false;
- }
- else if (op.equals("move") && (!params.containsKey("source") || !params.containsKey("target"))) {
- flag = false;
- }
- else if (op.equals("chmod") && (!params.containsKey("path") || !params.containsKey("permissions"))) {
- flag = false;
- }
- else if (op.equals("touchz") && (!params.containsKey("path"))) {
- flag = false;
- }
-
- if (flag) {
- // create key element
- Element nameele = doc.createElement(key);
- root.appendChild(nameele);
-
- // set attribute for parameter(s)
- for (Map.Entry<String, String> e : params.entrySet()) {
- nameele.setAttribute(e.getKey(), e.getValue());
- }
- }
- }
- }
-
- }
-
- /**
- * class to store FS operation and relevant parameters
- */
- public class FSActionData {
-
- private String op;
- private Map<String, String> params;
-
- public FSActionData() {
- params = new HashMap<String, String>();
- op = "";
- }
-
- public String getOp() {
- return op;
- }
-
- public void setOp(String s) {
- this.op = s;
- }
-
- public Map<String, String> getParams() {
- return params;
- }
-
- public void clear() {
- op = "";
- params.clear();
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/JavaPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/JavaPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/JavaPropertyTable.java
deleted file mode 100644
index cc38ddc..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/JavaPropertyTable.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.Property;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HasVerticalAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.RadioButton;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of java action
- */
-public class JavaPropertyTable extends PropertyTable {
-
- private List<Property> configs;
- private List<Property> prepare;
- private List<Property> others;
- private RadioButton rby;
- private RadioButton rbn;
- private TextBox mainClass;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public JavaPropertyTable(NodeWidget w) {
-
- super(w);
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- private void initConf() {
- configs = new ArrayList<Property>();
- configs.add(new Property("mapred.job.queue.name", ""));
-
- prepare = new ArrayList<Property>();
- prepare.add(new Property("", ""));
-
- others = new ArrayList<Property>();
- others.add(new Property("", ""));
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(10, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for JobTracker
- jt = insertTextRow(grid, 3, "JobTracker");
-
- // insert row for NameNode
- nn = insertTextRow(grid, 4, "NameNode");
-
- // insert row for Configuration
- grid.setWidget(5, 0, createLabel("Configuration"));
- grid.setWidget(5, 1, createSubTable("Property Name", "Value", configs, null));
-
- // insert row for Main Class
- mainClass = insertTextRow(grid, 6, "Main Class");
-
- // insert row for prepare
- grid.setWidget(7, 0, createLabel("Prepare"));
- grid.setWidget(7, 1, createSubTable("Operation", "Path", prepare, Arrays.asList("", "delete", "mkdir")));
-
- // insert row for others
- grid.setWidget(8, 0, createLabel("Others"));
- grid.setWidget(
- 8,
- 1,
- createSubTable("Tag", "value", others,
- Arrays.asList("", "job-xml", "java-opts", "arg", "file", "archive")));
-
- // insert row for Capture Output
- grid.setWidget(9, 0, createLabel("Capture Output"));
- HorizontalPanel btnpanel = new HorizontalPanel();
- btnpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
- rbn = new RadioButton("outputGroup", "false");
- rby = new RadioButton("outputGroup", "true");
- rbn.setChecked(true);
- btnpanel.add(rby);
- btnpanel.add(rbn);
- grid.setWidget(9, 1, btnpanel);
-
- }
-
- /**
- * Generate xml elements of java action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <java>
- Element javaEle = doc.createElement("java");
- action.appendChild(javaEle);
-
- // create <job-tracker>
- javaEle.appendChild(generateElement(doc, "job-tracker", jt));
-
- // create <name-node>
- javaEle.appendChild(generateElement(doc, "name-node", nn));
-
- // create <prepare>
- prepareToXML(prepare, javaEle, doc);
-
- // create <job-xml>
- filterListToXML(others, javaEle, doc, "job-xml");
-
- // create <configuration>
- configToXML(configs, javaEle, doc);
-
- // create <main-class>
- javaEle.appendChild(generateElement(doc, "main-class", mainClass));
-
- // create <java-opts>
- filterListToXML(others, javaEle, doc, "java-opts");
-
- // create <arg>
- filterListToXML(others, javaEle, doc, "arg");
-
- // create <file>
- filterListToXML(others, javaEle, doc, "file");
-
- // create <archive>
- filterListToXML(others, javaEle, doc, "archive");
-
- // create <capture-output>
- if (rby.getValue()) {
- Element outputele = doc.createElement("capture-output");
- javaEle.appendChild(outputele);
- }
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/MapReducePropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/MapReducePropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/MapReducePropertyTable.java
deleted file mode 100644
index 0fa3596..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/MapReducePropertyTable.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.Property;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of MR action
- */
-public class MapReducePropertyTable extends PropertyTable {
-
- protected List<Property> configs;
- protected List<Property> prepare;
- protected List<Property> others;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public MapReducePropertyTable(NodeWidget w) {
- super(w);
- init();
- }
-
- /**
- * Initialize a property table
- */
- protected void init() {
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- protected void initConf() {
- configs = new ArrayList<Property>();
- configs.add(new Property("mapred.mapper.class", ""));
- configs.add(new Property("mapred.reduce.class", ""));
- configs.add(new Property("mapred.job.queue.name", ""));
-
- prepare = new ArrayList<Property>();
- prepare.add(new Property("", ""));
-
- others = new ArrayList<Property>();
- others.add(new Property("", ""));
- }
-
- /**
- * Generate xml elements of mr action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <map-reduce>
- Element mrEle = doc.createElement("map-reduce");
- action.appendChild(mrEle);
-
- // create <job-tracker>
- mrEle.appendChild(generateElement(doc, "job-tracker", jt));
-
- // create <name-node>
- mrEle.appendChild(generateElement(doc, "name-node", nn));
-
- // create <prepare>
- prepareToXML(prepare, mrEle, doc);
-
- // create <job-xml>
- filterListToXML(others, mrEle, doc, "job-xml");
-
- // create <configuration>
- configToXML(configs, mrEle, doc);
-
- // create <file>
- filterListToXML(others, mrEle, doc, "file");
-
- // create <archive>
- filterListToXML(others, mrEle, doc, "archive");
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(8, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for JobTracker
- jt = insertTextRow(grid, 3, "JobTracker");
-
- // insert row for NameNode
- nn = insertTextRow(grid, 4, "NameNode");
-
- // insert row for prepare
- grid.setWidget(5, 0, createLabel("Prepare"));
- grid.setWidget(5, 1, createSubTable("Operation", "Path", prepare, Arrays.asList("", "delete", "mkdir")));
-
- // insert row for Configuration
- grid.setWidget(6, 0, createLabel("Configuration"));
- grid.setWidget(6, 1, createSubTable("Property Name", "Value", configs, null));
-
- // insert row for others
- grid.setWidget(7, 0, createLabel("Others"));
- grid.setWidget(7, 1, createSubTable("Tag", "value", others, Arrays.asList("", "job-xml", "file", "archive")));
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/PigPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/PigPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/PigPropertyTable.java
deleted file mode 100644
index 55e5ae1..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/PigPropertyTable.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.Property;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of pig action
- */
-public class PigPropertyTable extends PropertyTable {
-
- private List<Property> configs;
- private List<Property> prepare;
- private List<Property> others;
- private TextBox script;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public PigPropertyTable(NodeWidget w) {
-
- super(w);
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- private void initConf() {
- configs = new ArrayList<Property>();
- configs.add(new Property("mapred.job.queue.name", ""));
-
- prepare = new ArrayList<Property>();
- prepare.add(new Property("", ""));
-
- others = new ArrayList<Property>();
- others.add(new Property("", ""));
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(9, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for Script
- script = insertTextRow(grid, 3, "Script");
-
- // insert row for JobTracker
- jt = insertTextRow(grid, 4, "JobTracker");
-
- // insert row for NameNode
- nn = insertTextRow(grid, 5, "NameNode");
-
- // insert row for Configuration
- grid.setWidget(6, 0, createLabel("Configuration"));
- grid.setWidget(6, 1, createSubTable("Property Name", "Value", configs, null));
-
- // insert row for prepare
- grid.setWidget(7, 0, createLabel("Prepare"));
- grid.setWidget(7, 1, createSubTable("Operation", "Path", prepare, Arrays.asList("", "delete", "mkdir")));
-
- // insert row for others
- grid.setWidget(8, 0, createLabel("Others"));
- grid.setWidget(
- 8,
- 1,
- createSubTable("Tag", "value", others,
- Arrays.asList("", "job-xml", "argument", "param", "file", "archive")));
-
- }
-
- /**
- * Generate xml elements of pig action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <pig>
- Element pigEle = doc.createElement("pig");
- action.appendChild(pigEle);
-
- // create <job-tracker>
- pigEle.appendChild(generateElement(doc, "job-tracker", jt));
-
- // create <name-node>
- pigEle.appendChild(generateElement(doc, "name-node", nn));
-
- // create <prepare>
- prepareToXML(prepare, pigEle, doc);
-
- // create <job-xml>
- filterListToXML(others, pigEle, doc, "job-xml");
-
- // create <configuration>
- configToXML(configs, pigEle, doc);
-
- // create <script>
- pigEle.appendChild(generateElement(doc, "script", script));
-
- // create <param>
- filterListToXML(others, pigEle, doc, "param");
-
- // create <argument>
- filterListToXML(others, pigEle, doc, "argument");
-
- // create <file>
- filterListToXML(others, pigEle, doc, "file");
-
- // create <archive>
- filterListToXML(others, pigEle, doc, "archive");
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/PipesPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/PipesPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/PipesPropertyTable.java
deleted file mode 100644
index d3b2ef5..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/PipesPropertyTable.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.Property;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.xml.client.Text;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of MR pipes action
- */
-public class PipesPropertyTable extends MapReducePropertyTable {
-
- private List<Property> pipes;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public PipesPropertyTable(NodeWidget w) {
- super(w);
- }
-
- /**
- * Initialize a property table
- */
- @Override
- protected void init() {
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- @Override
- protected void initConf() {
- configs = new ArrayList<Property>();
- configs.add(new Property("mapred.job.queue.name", ""));
-
- prepare = new ArrayList<Property>();
- prepare.add(new Property("", ""));
-
- others = new ArrayList<Property>();
- others.add(new Property("", ""));
-
- pipes = new ArrayList<Property>();
- pipes.add(new Property("", ""));
- }
-
- /**
- * Generate xml elements of pipes action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <map-reduce>
- Element mrEle = doc.createElement("map-reduce");
- action.appendChild(mrEle);
-
- // create <job-tracker>
- mrEle.appendChild(generateElement(doc, "job-tracker", jt));
-
- // create <name-node>
- mrEle.appendChild(generateElement(doc, "name-node", nn));
-
- // create <prepare>
- prepareToXML(prepare, mrEle, doc);
-
- // create <pipes>
- Element pipesEle = null;
- pipesEle = filterListToXML(pipes, mrEle, pipesEle, doc, "map");
- pipesEle = filterListToXML(pipes, mrEle, pipesEle, doc, "reduce");
- pipesEle = filterListToXML(pipes, mrEle, pipesEle, doc, "inputformat");
- pipesEle = filterListToXML(pipes, mrEle, pipesEle, doc, "partitioner");
- pipesEle = filterListToXML(pipes, mrEle, pipesEle, doc, "writer");
- pipesEle = filterListToXML(pipes, mrEle, pipesEle, doc, "program");
-
- // create <job-xml>
- filterListToXML(others, mrEle, doc, "job-xml");
-
- // create <configuration>
- configToXML(configs, mrEle, doc);
-
- // create <file>
- filterListToXML(others, mrEle, doc, "file");
-
- // create <archive>
- filterListToXML(others, mrEle, doc, "archive");
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
- }
-
- /**
- * Create xml element of specified tag name
- *
- * @param list list of properties
- * @param root xml element under which new elements are added
- * @param pipes pipes element
- * @param doc xml doc
- * @param key tag name
- * @return
- */
- protected Element filterListToXML(List<Property> list, Element root, Element pipes, Document doc, String key) {
-
- for (Property prop : list) {
- if (prop.getName() != null && !prop.getName().matches("\\s*") && prop.getValue() != null
- && !prop.getValue().matches("\\s*")) {
- if (prop.getName().equals(key)) {
- if (pipes == null) {
- pipes = doc.createElement("pipes");
- root.appendChild(pipes);
- }
- // create key element
- Element nameele = doc.createElement(key);
- pipes.appendChild(nameele);
-
- // create text node under created element
- Text valele = doc.createTextNode(prop.getValue());
- nameele.appendChild(valele);
- }
- }
- }
- return pipes;
- }
-
- /**
- * Initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(9, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for Pipes setting
- grid.setWidget(3, 0, createLabel("Pipes Setting"));
- grid.setWidget(
- 3,
- 1,
- createSubTable("Tag", "value", pipes,
- Arrays.asList("", "map", "reduce", "inputformat", "partitioner", "writer", "program")));
-
- // insert row for JobTracker
- jt = insertTextRow(grid, 4, "JobTracker");
-
- // insert row for NameNode
- nn = insertTextRow(grid, 5, "NameNode");
-
- // insert row for prepare
- grid.setWidget(6, 0, createLabel("Prepare"));
- grid.setWidget(6, 1, createSubTable("Operation", "Path", prepare, Arrays.asList("", "delete", "mkdir")));
-
- // insert row for Configuration
- grid.setWidget(7, 0, createLabel("Configuration"));
- grid.setWidget(7, 1, createSubTable("Property Name", "Value", configs, null));
-
- // insert row for others
- grid.setWidget(8, 0, createLabel("Others"));
- grid.setWidget(8, 1, createSubTable("Tag", "value", others, Arrays.asList("", "job-xml", "file", "archive")));
-
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/SSHPropertyTable.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/SSHPropertyTable.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/SSHPropertyTable.java
deleted file mode 100644
index 34d7662..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/action/SSHPropertyTable.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-
-import com.google.gwt.cell.client.ButtonCell;
-import com.google.gwt.cell.client.FieldUpdater;
-import com.google.gwt.cell.client.TextInputCell;
-import com.google.gwt.xml.client.Text;
-import com.google.gwt.user.cellview.client.CellTable;
-import com.google.gwt.user.cellview.client.Column;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HasVerticalAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.RadioButton;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.view.client.ListDataProvider;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-
-/**
- * Class for property table of SSH action
- */
-public class SSHPropertyTable extends PropertyTable {
-
- private List<String> args;
- private TextBox host;
- private TextBox command;
- private RadioButton rby;
- private RadioButton rbn;
-
- /**
- * Constructor which records node widget and initializes
- *
- * @param w node widget
- */
- public SSHPropertyTable(NodeWidget w) {
- super(w);
- initConf();
- initWidget();
- }
-
- /**
- * Initialize configuration
- */
- protected void initConf() {
- args = new ArrayList<String>();
- args.add("");
- }
-
- /**
- * Generate xml elements of ssh action and attach them to xml doc
- */
- public void generateXML(Document doc, Element root, NodeWidget next) {
-
- Element action = doc.createElement("action");
- action.setAttribute("name", current.getName());
-
- // create <ssh>
- Element sshEle = doc.createElement("ssh");
- action.appendChild(sshEle);
-
- // create <host>
- sshEle.appendChild(generateElement(doc, "host", host));
-
- // create <command>
- sshEle.appendChild(generateElement(doc, "command", command));
-
- // create <args>
- for (String arg : args) {
- Element argsEle = doc.createElement("args");
- Text n = doc.createTextNode(arg);
- argsEle.appendChild(n);
- sshEle.appendChild(argsEle);
-
- }
-
- // create <capture-output>
- if (rby.getValue()) {
- Element outputele = doc.createElement("capture-output");
- sshEle.appendChild(outputele);
- }
-
- // create <ok>
- action.appendChild(generateOKElement(doc, next));
-
- // create <error>
- action.appendChild(generateErrorElement(doc));
-
- root.appendChild(action);
- }
-
- /**
- * initialize widgets shown in property table
- */
- protected void initWidget() {
-
- grid = new Grid(7, 2);
- this.add(grid);
-
- this.setAlwaysShowScrollBars(true);
- this.setSize("100%", "80%");
-
- // insert row for Name
- name = insertTextRow(grid, 0, "Name");
-
- // insert row for OK
- insertOKRow(grid, 1);
-
- // insert row for ERROR
- insertErrorRow(grid, 2);
-
- // insert row for Host
- host = insertTextRow(grid, 3, "Host");
-
- // insert row for Command
- command = insertTextRow(grid, 4, "Command");
-
- // insert row for Arguments
- grid.setWidget(5, 0, createLabel("Args"));
- grid.setWidget(5, 1, createArgsTable(args));
-
- // insert row for Capture Output
- grid.setWidget(6, 0, createLabel("Capture Output"));
- HorizontalPanel btnpanel = new HorizontalPanel();
- btnpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
- rbn = new RadioButton("outputGroup", "false");
- rby = new RadioButton("outputGroup", "true");
- rbn.setChecked(true);
- btnpanel.add(rby);
- btnpanel.add(rbn);
- grid.setWidget(6, 1, btnpanel);
-
- }
-
- /**
- * Create a table showing list of arguments added by a user
- *
- * @param data
- * @return
- */
- protected CellTable<String> createArgsTable(List<String> data) {
- final CellTable<String> table = new CellTable<String>();
- final ListDataProvider<String> dataProvider = new ListDataProvider<String>();
- dataProvider.setList(data);
- dataProvider.addDataDisplay(table);
-
- // Add Name column
- Column<String, String> argCol = null;
-
- // when editText is used for name column
-
- argCol = new Column<String, String>(new TextInputCell()) {
- @Override
- public String getValue(String object) {
- return object;
- }
- };
-
- // set event for updating value
- argCol.setFieldUpdater(new FieldUpdater<String, String>() {
- @Override
- public void update(int index, String object, String value) {
- List<String> li = dataProvider.getList();
- li.remove(index);
- li.add(index, value);
- }
- });
- table.addColumn(argCol, "");
-
- // Button to add row
- Column<String, String> addCol = new Column<String, String>(new ButtonCell()) {
- @Override
- public String getValue(String object) {
- return " + ";
- }
- };
- addCol.setFieldUpdater(new FieldUpdater<String, String>() {
- @Override
- public void update(int index, String object, String value) {
- List<String> li = dataProvider.getList();
- li.add(index + 1, new String(" "));
- }
- });
-
- table.addColumn(addCol, "");
-
- // Button to delete row
- Column<String, String> delCol = new Column<String, String>(new ButtonCell()) {
- @Override
- public String getValue(String object) {
- return " - ";
- }
- };
-
- delCol.setFieldUpdater(new FieldUpdater<String, String>() {
- @Override
- public void update(int index, String object, String value) {
- List<String> li = dataProvider.getList();
- li.remove(index);
- if (li.size() == 0) {
- li.add(" ");
- table.redraw();
- }
- }
- });
-
- table.addColumn(delCol, "");
-
- return table;
-
- }
-}
[4/4] oozie git commit: OOZIE-2625 Drop workflowgenerator (rkanter)
Posted by rk...@apache.org.
OOZIE-2625 Drop workflowgenerator (rkanter)
Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/aec39dd2
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/aec39dd2
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/aec39dd2
Branch: refs/heads/master
Commit: aec39dd2669b22c385961c48759e7e037e15160d
Parents: d03d463
Author: Robert Kanter <rk...@cloudera.com>
Authored: Thu Aug 4 12:05:10 2016 -0700
Committer: Robert Kanter <rk...@cloudera.com>
Committed: Thu Aug 4 12:05:10 2016 -0700
----------------------------------------------------------------------
distro/pom.xml | 15 -
distro/src/main/bin/oozie-setup.sh | 7 -
pom.xml | 26 -
release-log.txt | 1 +
src/main/assemblies/distro.xml | 8 -
workflowgenerator/README.txt | 138 ----
workflowgenerator/pom.xml | 185 -----
.../src/main/assemblies/workflowgenerator.xml | 30 -
.../client/OozieDiagramController.java | 452 -----------
.../client/OozieWorkflowGenerator.java | 765 -------------------
.../client/property/Property.java | 75 --
.../client/property/PropertyTable.java | 620 ---------------
.../client/property/PropertyTableFactory.java | 137 ----
.../property/action/EmailPropertyTable.java | 114 ---
.../client/property/action/FSPropertyTable.java | 477 ------------
.../property/action/JavaPropertyTable.java | 189 -----
.../property/action/MapReducePropertyTable.java | 156 ----
.../property/action/PigPropertyTable.java | 168 ----
.../property/action/PipesPropertyTable.java | 207 -----
.../property/action/SSHPropertyTable.java | 234 ------
.../property/action/ShellPropertyTable.java | 190 -----
.../property/action/StreamingPropertyTable.java | 206 -----
.../property/action/SubWFPropertyTable.java | 140 ----
.../property/control/DecisionPropertyTable.java | 423 ----------
.../property/control/EndPropertyTable.java | 67 --
.../property/control/ForkPropertyTable.java | 237 ------
.../property/control/JoinPropertyTable.java | 72 --
.../property/control/KillPropertyTable.java | 77 --
.../property/control/StartPropertyTable.java | 73 --
.../property/control/WrkflowPropertyTable.java | 169 ----
.../client/widget/NodeWidget.java | 272 -------
.../client/widget/action/EmailActionWidget.java | 48 --
.../client/widget/action/FSActionWidget.java | 48 --
.../client/widget/action/JavaActionWidget.java | 49 --
.../widget/action/MapReduceActionWidget.java | 48 --
.../client/widget/action/PigActionWidget.java | 49 --
.../client/widget/action/PipesActionWidget.java | 48 --
.../client/widget/action/SSHActionWidget.java | 48 --
.../client/widget/action/ShellActionWidget.java | 48 --
.../widget/action/StreamingActionWidget.java | 48 --
.../client/widget/action/SubWFActionWidget.java | 48 --
.../widget/control/DecisionNodeWidget.java | 49 --
.../client/widget/control/EndNodeWidget.java | 56 --
.../client/widget/control/ForkNodeWidget.java | 50 --
.../client/widget/control/JoinNodeWidget.java | 47 --
.../client/widget/control/KillNodeWidget.java | 42 -
.../client/widget/control/StartNodeWidget.java | 69 --
.../workflowgenerator/workflowgenerator.gwt.xml | 43 --
.../src/main/resources/img/action.png | Bin 889 -> 0 bytes
.../src/main/resources/img/add-btn.png | Bin 1656 -> 0 bytes
.../src/main/resources/img/decision.png | Bin 1042 -> 0 bytes
.../src/main/resources/img/del-btn.png | Bin 1521 -> 0 bytes
.../src/main/resources/img/distcp-action.png | Bin 1584 -> 0 bytes
.../src/main/resources/img/email-action.png | Bin 1454 -> 0 bytes
.../src/main/resources/img/end.png | Bin 1246 -> 0 bytes
.../src/main/resources/img/fork-shape.png | Bin 1591 -> 0 bytes
.../src/main/resources/img/fork.png | Bin 2078 -> 0 bytes
.../src/main/resources/img/fs-action.png | Bin 1310 -> 0 bytes
.../src/main/resources/img/hive-action.png | Bin 1401 -> 0 bytes
.../src/main/resources/img/java-action.png | Bin 1428 -> 0 bytes
.../src/main/resources/img/join-shape.png | Bin 1609 -> 0 bytes
.../src/main/resources/img/join.png | Bin 2141 -> 0 bytes
.../src/main/resources/img/kill.png | Bin 2439 -> 0 bytes
.../src/main/resources/img/mr-action.png | Bin 1335 -> 0 bytes
.../src/main/resources/img/pig-action.png | Bin 1387 -> 0 bytes
.../src/main/resources/img/pipes-action.png | Bin 1610 -> 0 bytes
.../src/main/resources/img/shell-action.png | Bin 1612 -> 0 bytes
.../src/main/resources/img/ssh-action.png | Bin 1346 -> 0 bytes
.../src/main/resources/img/start-shape.png | Bin 1513 -> 0 bytes
.../src/main/resources/img/start.png | Bin 2368 -> 0 bytes
.../src/main/resources/img/streaming-action.png | Bin 1566 -> 0 bytes
.../src/main/resources/img/subwf-action.png | Bin 1562 -> 0 bytes
.../workflowgenerator/workflowgenerator.gwt.xml | 43 --
.../src/main/webapp/WEB-INF/web.xml | 31 -
.../src/main/webapp/workflowgenerator.css | 200 -----
.../src/main/webapp/workflowgenerator.html | 66 --
.../client/OozieWorkflowGeneratorTest.java | 35 -
.../workflowgeneratorTest-dev.launch | 39 -
.../workflowgeneratorTest-prod.launch | 39 -
79 files changed, 1 insertion(+), 7220 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/distro/pom.xml
----------------------------------------------------------------------
diff --git a/distro/pom.xml b/distro/pom.xml
index 73a7d97..7baaff2 100644
--- a/distro/pom.xml
+++ b/distro/pom.xml
@@ -130,21 +130,6 @@
<profiles>
<profile>
- <id>wfgen</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.apache.oozie</groupId>
- <artifactId>oozie-workflowgenerator</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- <type>war</type>
- </dependency>
- </dependencies>
- </profile>
- <profile>
<id>loginServerExample</id>
<activation>
<activeByDefault>false</activeByDefault>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/distro/src/main/bin/oozie-setup.sh
----------------------------------------------------------------------
diff --git a/distro/src/main/bin/oozie-setup.sh b/distro/src/main/bin/oozie-setup.sh
index a41e42d..3b6a643 100644
--- a/distro/src/main/bin/oozie-setup.sh
+++ b/distro/src/main/bin/oozie-setup.sh
@@ -217,13 +217,6 @@ else
extjsHome=${libext}/ext-2.2.zip
addExtjs=true
fi
- # find war files (e.g., workflowgenerator) under /libext and deploy
- if [ `ls ${libext} | grep \.war\$ | wc -c` != 0 ]; then
- for i in "${libext}/"*.war; do
- echo "INFO: Deploying extention: $i"
- cp $i ${CATALINA_BASE}/webapps/
- done
- fi
fi
prepare
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 27a3098..a1c9357 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1746,32 +1746,6 @@
</properties>
</profile>
<profile>
- <id>wfgen</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <modules>
- <module>workflowgenerator</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <fork>true</fork>
- <source>1.6</source>
- <target>1.6</target>
- <compilerArguments>
- <Xlint/>
- <Xmaxwarns>9999</Xmaxwarns>
- </compilerArguments>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
<id>hadoop-1</id>
<activation>
<activeByDefault>true</activeByDefault>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 810330d..7df9643 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
-- Oozie 4.3.0 release (trunk - unreleased)
+OOZIE-2625 Drop workflowgenerator (rkanter)
OOZIE-2602 Upgrade oozie to pig 0.16.0 (nperiwal via jaydeepvishwakarma)
OOZIE-2493 TestDistcpMain deletes action.xml from wrong filesystem (abhishekbafna via rkanter)
OOZIE-2496 Testcase failure due to environment specific line.separator value (abhishekbafna via rkanter)
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/src/main/assemblies/distro.xml
----------------------------------------------------------------------
diff --git a/src/main/assemblies/distro.xml b/src/main/assemblies/distro.xml
index bdb5351..1ffbfd6 100644
--- a/src/main/assemblies/distro.xml
+++ b/src/main/assemblies/distro.xml
@@ -92,14 +92,6 @@
</includes>
<fileMode>0555</fileMode>
</fileSet>
- <fileSet>
- <directory>${basedir}/../workflowgenerator/target</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>oozie-wfgen.war</include>
- </includes>
- <fileMode>0555</fileMode>
- </fileSet>
<!-- Oozie Login Server Example war and jar -->
<fileSet>
<directory>${basedir}/../login/target</directory>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/README.txt
----------------------------------------------------------------------
diff --git a/workflowgenerator/README.txt b/workflowgenerator/README.txt
deleted file mode 100644
index 61e2102..0000000
--- a/workflowgenerator/README.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-
-Workflow Generator Tool
-=========================
-
------------------------------------------------
-What is Workflow Generator Tool
------------------------------------------------
-Workflow generator tool is a web application where a user can construct Oozie workflow through GUI.
-Since it is based on html and javascript, a user needs only browser to access the tool. (major browsers such as Chrome, Firefox, IE supported)
-It is developed using Google Web Toolkit ( https://developers.google.com/web-toolkit/ ), which provides functionality to compile java code into javascript.
-Therefore, although final product is in javascript, development process is performed in java.
-
-
--------------------------------------------------------------------------------------
-How to build and launch Workflow Generator Tool as part of entire oozie package build
--------------------------------------------------------------------------------------
-
-1. run mkdistro.sh on top-level directory
----------------------
-bin/mkdistro.sh -P wfgen
----------------------
-[NOTE]
-currently workflow generator is not included in build as default, thus need to specify maven profile (-P wfgen)
-
-2. move to output directory
---------------------
-cd distro/target/oozie-<version>-distro/oozie-<version>
---------------------
-
-3-(a). copy the war file to oozie-server/webapps/
---------------------
-cp oozie-wfgen.war ./oozie-server/webapps
---------------------
-
-or
-
-3-(b). create /libext and copy the war file to it
---------------------
-mkdir libext
-cp oozie-wfgen.war ./libext
---------------------
-[NOTE]
-bin/oozie-setup.sh is implemented such that wfgen.war is automatically picked up and deployed to oozie server
-
-4. start oozie server (using bin/oozie-setup.sh and bin/oozie-start.sh) and check through browser
----------------------
-http://localhost:11000/oozie-wfgen
----------------------
-[NOTE]
-using default port number, which is 11000. tomcat server may fail to start if other application already using the same port. please make sure the port is not used.
-
-
-
-----------------------------------------------------------------------------------------
-How to build and launch Workflow Generator Tool only (not whole package build)
-----------------------------------------------------------------------------------------
-
-There are two possible options
-Option-A) launch app using web server that you are already running (without using bundled tomcat)
-Option-B) launch app in dev mode using bundled internal web server provided by GWT.
-
-Option-A would be suitable when you want to host this application on the existing tomcat instance. You need to copy war file into webapp directory of existing tomcat.
-Option-B would be suitable for development of the tool since you can see error messages for debugging, and don't need to create and copy war file every time
-
-Option-B internally using java class (servlet), not javascript.
-On browser UI, therefore, DOM operation (e.g., creating/deleting nodewidget) might be slower than using pure javascript (Option-A)
-
-===============================================
-<Option-A>
-
-1. build workflowgenerator and create war file
----------------------
-cd workflowgenerator // assuming you are on top directory
-mvn clean package
----------------------
-[NOTE]
-test case not implemented yet
-
-2. copy war file to webapps directory of web server
----------------------
-cp target/oozie-wfgen.war <webserver-installed-directory>/webapps/
----------------------
-
-3. start web server
----------------------
-<webserver-installed-directory>/bin/startup.sh
----------------------
-[NOTE]
-name of start script might be different in your web-server, please change accordingly
-
-4. check through browser
----------------------
-http://localhost:8080/oozie-wfgen
----------------------
-[NOTE]
-port number might not be 8080 in your web-server setting (usually it's default in tomcat), please change accordingly
-
-5. stop web server
----------------------
-<webserver-installed-directory>/bin/shutdown.sh
----------------------
-[NOTE] name of shutdown script might be different in your web-server, please change accordingly
-
-===============================================
-<Option-B>
-
-1. compile and start GWT launcher
----------------------
-cd workflowgenerator // assuming you are on top directory
-mvn clean gwt:run
----------------------
-you will see GWT launcher program automatically starts
-
-2. launch app on browser from GWT launcher
----------------------
-press button either "Launch Default Browser" or "Copy to Clipboard"
-
-"Launcher Default Browser"
- --> automatically open application on default browser
- --> First time, you will be asked to install plug-in on browser, (also take few mins to launch app, pls be patient)
-
-"Copy to Clipboard"
- --> you can copy this link to browser that you like and open it
- --> First time, you will be asked to install plug-in on browser (also take few mins to launch app, pls be patient)
----------------------
-
-if you want to kill process, Ctrl-C in console
-
-
-=====================================================================
-
-If you have any questions/issues, please send an email to:
-
-user@oozie.apache.org
-
-Subscribe using the link:
-
-http://oozie.apache.org/mail-lists.html
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/pom.xml
----------------------------------------------------------------------
diff --git a/workflowgenerator/pom.xml b/workflowgenerator/pom.xml
deleted file mode 100644
index 38e918c..0000000
--- a/workflowgenerator/pom.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <parent>
- <groupId>org.apache.oozie</groupId>
- <artifactId>oozie-main</artifactId>
- <version>4.3.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.oozie</groupId>
- <artifactId>oozie-workflowgenerator</artifactId>
- <version>4.3.0-SNAPSHOT</version>
- <packaging>war</packaging>
- <description>Apache Oozie WorkflowGenerator</description>
- <name>Apache Oozie WorkflowGenerator</name>
-
- <properties>
- <!-- Convenience property to set the GWT version -->
- <gwtVersion>2.5.0-rc1</gwtVersion>
- <!-- GWT needs at least java 1.5 -->
- <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-servlet</artifactId>
- <version>${gwtVersion}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- <version>${gwtVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.10</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.0.0.GA</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.0.0.GA</version>
- <classifier>sources</classifier>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.allen-sauer.gwt.dnd</groupId>
- <artifactId>gwt-dnd</artifactId>
- <version>3.1.2</version>
- </dependency>
- <dependency>
- <groupId>com.orange.links</groupId>
- <artifactId>gwt-links</artifactId>
- <version>1.3-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-incubator</artifactId>
- <version>2.0.1</version>
- </dependency>
- </dependencies>
- <build>
- <!-- Generate compiled stuff in the folder used for developing mode -->
- <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
- <finalName>oozie-wfgen</finalName>
-
- <plugins>
-
- <!-- GWT Maven Plugin -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>gwt-maven-plugin</artifactId>
- <version>2.5.0-rc1</version>
- <executions>
- <execution>
- <configuration>
- <module>org.apache.oozie.tools.workflowgenerator.workflowgenerator</module>
- </configuration>
- <goals>
- <goal>compile</goal>
- <goal>test</goal>
- </goals>
- </execution>
- </executions>
- <!-- Plugin configuration. There are many available options, see
- gwt-maven-plugin documentation at codehaus.org -->
- <configuration>
- <runTarget>workflowgenerator.html</runTarget>
- <hostedWebapp>${webappDirectory}</hostedWebapp>
- </configuration>
- </plugin>
-
- <!-- Copy static web files before executing gwt:run -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1.1</version>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>exploded</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <webappDirectory>${webappDirectory}</webappDirectory>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8.1</version>
- <configuration>
- <linksource>true</linksource>
- <quiet>true</quiet>
- <verbose>false</verbose>
- <source>${maven.compile.source}</source>
- <charset>${maven.compile.encoding}</charset>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>javadoc</goal>
- </goals>
- <phase>package</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>src/main/resources/img</directory>
- <targetPath>../../img</targetPath>
- </resource>
- </resources>
- </build>
- <repositories>
- <repository>
- <id>gwt-links</id>
- <url>http://gwt-links.googlecode.com/svn/repository</url>
- </repository>
- </repositories>
-</project>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/assemblies/workflowgenerator.xml
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/assemblies/workflowgenerator.xml b/workflowgenerator/src/main/assemblies/workflowgenerator.xml
deleted file mode 100644
index 3b780b0..0000000
--- a/workflowgenerator/src/main/assemblies/workflowgenerator.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<assembly>
- <id>tomcat</id>
- <formats>
- <format>tar.gz</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${basedir}/target/${project.artifactId}-${project.version}-tomcat</directory>
- <outputDirectory>${project.artifactId}-${project.version}</outputDirectory>
- </fileSet>
- </fileSets>
-</assembly>
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/OozieDiagramController.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/OozieDiagramController.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/OozieDiagramController.java
deleted file mode 100644
index 4e8c8cf..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/OozieDiagramController.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.oozie.tools.workflowgenerator.client.property.control.WrkflowPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.KillNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.StartNodeWidget;
-
-import com.google.gwt.dom.client.Style.Cursor;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.ui.MenuItem;
-import com.google.gwt.user.client.ui.Panel;
-import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.TextArea;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Element;
-import com.google.gwt.xml.client.Node;
-import com.google.gwt.xml.client.XMLParser;
-import com.orange.links.client.DiagramController;
-import com.orange.links.client.connection.Connection;
-import com.orange.links.client.event.TieLinkEvent;
-import com.orange.links.client.menu.ContextMenu;
-import com.orange.links.client.shapes.FunctionShape;
-
-/**
- * Class to provide a panel where users create node widget or draw a line to
- * construct a workflow
- */
-public class OozieDiagramController extends DiagramController {
-
- private Panel xmlpanel;
- private WrkflowPropertyTable wrkflowtable;
-
- /**
- * Constructor which records canvas size
- *
- * @param canvasWidth width of canvas
- * @param canvasHeight height of canvas
- */
- public OozieDiagramController(int canvasWidth, int canvasHeight) {
- super(canvasWidth, canvasHeight);
- }
-
- /**
- * Constructor which records canvas size and frame size
- *
- * @param canvasWidth width of canvas
- * @param canvasHeight height of canvas
- * @param frameWidth width of frame
- * @param frameHeight height of frame
- */
- public OozieDiagramController(int canvasWidth, int canvasHeight, int frameWidth, int frameHeight) {
- super(canvasWidth, canvasHeight, frameWidth, frameHeight);
- }
-
- /**
- * Initialize right-click context menu
- */
- public void initMenu() {
- canvasMenu = new ContextMenu();
- canvasMenu.addItem(new MenuItem("Generate XML", new Command() {
- @Override
- public void execute() {
- generateXml();
- }
- }));
-
- }
-
- /**
- * Return a list of neighboring node widgets which the specified node widget
- * has connection to
- *
- * @param w node widget
- * @return
- */
- public List<NodeWidget> getCurrentNeighbor(NodeWidget w) {
- List<NodeWidget> current = new ArrayList<NodeWidget>();
- FunctionShape s = widgetShapeMap.get(w);
- Map<Widget, Connection> connectMap = functionsMap.get(w);
- if (connectMap == null) {
- return null;
- }
- for (Iterator<Map.Entry<Widget, Connection>> it = connectMap.entrySet().iterator(); it.hasNext();) {
- Map.Entry<Widget, Connection> entry = it.next();
- Connection c = entry.getValue();
- if (c.getStartShape() == s) {
- FunctionShape e = (FunctionShape) c.getEndShape();
- current.add((NodeWidget) e.asWidget());
- }
- }
-
- return current;
- }
-
- /**
- * Return a list of connections that the specified node widget has
- *
- * @param w node widget
- * @return
- */
- public List<Connection> getConnection(NodeWidget w) {
- List<Connection> li = new ArrayList<Connection>();
- FunctionShape shape = widgetShapeMap.get(w);
- for (Connection c : shape.getConnections()) {
- li.add(c);
- }
- return li;
- }
-
- /**
- * Add a new connection from one node widget to the other, while deleting
- * existing connection that the start node widget has if any
- *
- * @param start start node widget
- * @param end end node widget
- */
- public void addConnection(NodeWidget start, NodeWidget end) {
- boolean exists = false;
- FunctionShape s1 = widgetShapeMap.get(start);
- FunctionShape s2 = widgetShapeMap.get(end);
- Connection current = null;
- for (Connection c : s1.getConnections()) {
- if (c.getStartShape() == s1) {
- current = c;
- }
- if (c.getEndShape() == s2) {
- exists = true;
- break;
- }
- }
- if (!exists) {
- if (current != null) {
- this.deleteConnection(current);
- s1.removeConnection(current);
- s2.removeConnection(current);
- }
- Connection c = drawStraightArrowConnection(start, end);
- fireEvent(new TieLinkEvent(start, end, c));
- }
- }
-
- /**
- * Add a new connection from one node widget to the other without deleting
- * existing connection that the starting node widget has
- *
- * @param start start node widget
- * @param end end node widget
- * @return
- */
- public Connection addMultiConnection(NodeWidget start, NodeWidget end) {
- boolean exists = false;
- FunctionShape s1 = widgetShapeMap.get(start);
- FunctionShape s2 = widgetShapeMap.get(end);
- Connection conn = null;
-
- for (Connection c : s1.getConnections()) {
- if (c.getEndShape() == s2) {
- exists = true;
- break;
- }
- }
- if (!exists) {
- conn = drawStraightArrowConnection(start, end);
- fireEvent(new TieLinkEvent(start, end, conn));
- }
-
- return conn;
- }
-
- /**
- * Return a connection between node widgets
- *
- * @param start start node widget
- * @param end end node widget
- * @return
- */
- public Connection getConnection(NodeWidget start, NodeWidget end) {
-
- Connection conn = null;
- Map<Widget, Connection> m = (Map<Widget, Connection>) functionsMap.get(start);
- if (m != null) {
- conn = (Connection) m.get(end);
- }
- return conn;
- }
-
- /**
- * Return if there is a connection between node widgets
- *
- * @param start start node widget
- * @param end end node widget
- * @return
- */
- public boolean isConnected(NodeWidget start, NodeWidget end) {
- return functionsMap.get(start).containsKey(end);
- }
-
- /**
- * Remove a connection between node widgets
- *
- * @param start start node widget
- * @param end end node widget
- */
- public void removeConnection(NodeWidget start, NodeWidget end) {
-
- FunctionShape s1 = widgetShapeMap.get(start);
- FunctionShape s2 = widgetShapeMap.get(end);
-
- if (functionsMap.get(start).containsKey(end)) {
- Connection c = functionsMap.get(start).get(end);
- this.deleteConnection(c);
- s1.removeConnection(c);
- s2.removeConnection(c);
- functionsMap.get(start).remove(end);
- }
- }
-
- /**
- * Set a panel to display generated xml
- *
- * @param w
- */
- public void setXmlPanel(Panel w) {
- this.xmlpanel = w;
- }
-
- /**
- * Generate a xml document of the current workflow
- */
- public void generateXml() {
-
- Document xmldoc = null;
- xmldoc = (Document) XMLParser.createDocument();
-
- // initialize visit-flag of all widgets
- for (Widget w : widgetShapeMap.keySet()) {
- ((NodeWidget) w).unvisit();
- }
-
- NodeWidget current = null;
- NodeWidget next = null;
- LinkedList<NodeWidget> queue = new LinkedList<NodeWidget>();
-
- String appname = "visualizationApp";
- if (wrkflowtable != null) {
- appname = wrkflowtable.getName();
- }
- Element root = xmldoc.createElement("workflow-app");
- root.setAttribute("xmlns", wrkflowtable.getNameSpace());
- root.setAttribute("name", appname);
- xmldoc.appendChild(root);
-
- wrkflowtable.generateXML(xmldoc, root, null);
-
- for (Connection c : this.connections) {
- FunctionShape startShape = (FunctionShape) c.getStartShape();
- NodeWidget w = (NodeWidget) startShape.asWidget();
- if (w instanceof StartNodeWidget) {
- queue.add(w);
- break;
- }
- }
-
- while ((current = queue.poll()) != null) {
-
- if (current.isVisited()) {
- continue;
- }
- Map<Widget, Connection> nextMap = this.functionsMap.get(current);
- if (nextMap == null) {
- next = null;
- }
- else {
- for (Iterator itr = nextMap.keySet().iterator(); itr.hasNext();) {
- next = (NodeWidget) itr.next();
- queue.add(next);
- }
- }
- current.generateXML(xmldoc, root, next);
- current.visit();
- }
-
- // Adding Kill Node
- for (Widget w : this.widgetShapeMap.keySet()) {
- if (w instanceof KillNodeWidget) {
- ((KillNodeWidget) w).generateXML(xmldoc, root, null);
- }
- }
-
- xmlpanel.clear();
- TextArea xml = new TextArea();
- xml.getElement().setScrollTop(xml.getElement().getScrollHeight());
- xml.setCharacterWidth(80);
- xml.setVisibleLines(30);
- xml.setText(formatXML(root, " "));
- xmlpanel.add(xml);
-
- }
-
- /**
- * Format generated xml doc by indentation
- *
- * @param node
- * @param indent
- * @return
- */
- protected String formatXML(Node node, String indent) {
- StringBuilder formatted = new StringBuilder();
-
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- StringBuilder attributes = new StringBuilder();
- for (int k = 0; k < node.getAttributes().getLength(); k++) {
- attributes.append(" ");
- attributes.append(node.getAttributes().item(k).getNodeName());
- attributes.append("=\"");
- attributes.append(node.getAttributes().item(k).getNodeValue());
- attributes.append("\"");
- }
-
- formatted.append(indent);
- formatted.append("<");
- formatted.append(node.getNodeName());
- formatted.append(attributes.toString());
- if (!node.hasChildNodes() || (node.hasChildNodes() && node.getFirstChild().getNodeType() == Node.TEXT_NODE)) {
- formatted.append(">");
- }
- else {
- formatted.append(">\n");
- }
-
- for (int i = 0; i < node.getChildNodes().getLength(); i++) {
- formatted.append(formatXML(node.getChildNodes().item(i), indent + " "));
- }
-
- if (node.hasChildNodes() && node.getFirstChild().getNodeType() != Node.TEXT_NODE) {
- formatted.append(indent);
- }
- formatted.append("</");
- formatted.append(node.getNodeName());
- formatted.append(">\n");
- }
- else {
- if (node.toString().trim().length() > 0) {
- formatted.append(node.toString());
- }
- }
-
- return formatted.toString();
- }
-
- /**
- * Update a diagram controller
- */
- @Override
- public void update() {
- redrawConnections();
-
- // If the user is dragging widgets, do nothing
- if (inDragWidget) {
- return;
- }
- topCanvas.clear();
-
- // Search for selectable area
- if (!inDragBuildArrow) {
- for (FunctionShape s : shapes) {
- if (s.isMouseNearSelectableArea(mousePoint)) {
- s.highlightSelectableArea(mousePoint);
- inEditionSelectableShapeToDrawConnection = true;
- startFunctionWidget = s.asWidget();
- RootPanel.getBodyElement().getStyle().setCursor(Cursor.POINTER);
- return;
- }
- inEditionSelectableShapeToDrawConnection = false;
- }
- }
- else {
- // Don't go deeper if in edition mode
- // If mouse over a widget, highlight it
- FunctionShape s = getShapeUnderMouse();
- if (s != null) {
- s.drawHighlight();
- highlightFunctionShape = s;
- }
- else if (highlightFunctionShape != null) {
- highlightFunctionShape.draw();
- highlightFunctionShape = null;
- }
- clearAnimationsOnCanvas();
- }
-
- // Test if in Drag Movable Point
- if (!inDragMovablePoint && !inDragBuildArrow) {
- for (Connection c : connections) {
- if (c.isMouseNearConnection(mousePoint)) {
- highlightPoint = c.highlightMovablePoint(mousePoint);
- highlightConnection = getConnectionNearMouse();
- inEditionDragMovablePoint = true;
- RootPanel.getBodyElement().getStyle().setCursor(Cursor.POINTER);
- return;
- }
- inEditionDragMovablePoint = false;
- }
- }
-
- clearAnimationsOnCanvas();
- }
-
- /**
- * Return a workflow property table
- *
- * @return
- */
- public WrkflowPropertyTable getWrkflowPropertyTable() {
- return wrkflowtable;
- }
-
- /**
- * Set a workflow property table
- *
- * @param t Workflow property table
- */
- public void setWrkflowPropertyTable(WrkflowPropertyTable t) {
- this.wrkflowtable = t;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/OozieWorkflowGenerator.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/OozieWorkflowGenerator.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/OozieWorkflowGenerator.java
deleted file mode 100644
index 113a401..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/OozieWorkflowGenerator.java
+++ /dev/null
@@ -1,765 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client;
-
-import java.util.ArrayList;
-import java.util.EnumMap;
-import java.util.List;
-
-import org.apache.oozie.tools.workflowgenerator.client.OozieDiagramController;
-import org.apache.oozie.tools.workflowgenerator.client.property.PropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.property.control.WrkflowPropertyTable;
-import org.apache.oozie.tools.workflowgenerator.client.widget.NodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.EmailActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.FSActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.JavaActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.MapReduceActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.PigActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.PipesActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.SSHActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.ShellActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.StreamingActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.action.SubWFActionWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.DecisionNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.EndNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.ForkNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.JoinNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.KillNodeWidget;
-import org.apache.oozie.tools.workflowgenerator.client.widget.control.StartNodeWidget;
-
-import com.allen_sauer.gwt.dnd.client.PickupDragController;
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.dom.client.Style.Unit;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.logical.shared.SelectionEvent;
-import com.google.gwt.event.logical.shared.SelectionHandler;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.Random;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.*;
-
-/**
- * Main class of application
- * <p>
- * implements EntryPoint class which defines <code>onModuleLoad()</code>.
- */
-public class OozieWorkflowGenerator implements EntryPoint {
-
- private static final int ZINDEX_FRONT_OF_GRID = 10;
-
- private PickupDragController dragController;
- private OozieDiagramController controller;
- private Panel propPanel;
- private List<NodeWidget> widgets;
- private StartNodeWidget start;
- private EndNodeWidget end;
- private KillNodeWidget kill;
- private WrkflowPropertyTable wrkflowtable;
- private NodeWidget node;
- private EnumMap<NodeType, Integer> nodeCount;
-
- enum NodeType {
- START, END, KILL, FORK, JOIN, DECISION, MAPREDUCE, PIG, FS, JAVA, PIPES, STREAMING, SHELL, SSH, EMAIL, SUBWF
- };
-
- /**
- * Return a set of created node widgets in a workflow design panel
- *
- * @return
- */
- public List<NodeWidget> getWidgets() {
- return this.widgets;
- }
-
- /**
- * Set and display the property table of a selected node widget
- *
- * @param table
- */
- public void setPropertyTable(PropertyTable table) {
- propPanel.clear();
- propPanel.add(table);
- }
-
- /**
- * Return an instance of current diagram controller
- *
- * @return
- */
- public OozieDiagramController getDiagramController() {
- return this.controller;
- }
-
- /**
- * Return the currently selected node widget
- *
- * @return
- */
- public NodeWidget getNodeWidget() {
- return this.node;
- }
-
- /**
- * Set the current node widget
- *
- * @param n node widget
- */
- protected void setNodeWidget(NodeWidget n) {
- this.node = n;
- }
-
- /**
- * onModuleLoad is the entry point method.
- */
- @SuppressWarnings("deprecation")
- public void onModuleLoad() {
-
- widgets = new ArrayList<NodeWidget>();
- nodeCount = new EnumMap<OozieWorkflowGenerator.NodeType, Integer>(NodeType.class);
-
- // start DiagramController (gwt-links library)
- controller = new OozieDiagramController(1200, 600);
- controller.showGrid(true); // Display a background grid
-
- // start PickUpDragContoller (gwt-Drag-and-Drop library)
- dragController = new PickupDragController(controller.getView(), true);
-
- // register the dragController in GWT-Links
- controller.registerDragController(dragController);
-
- // panel for Property Table
- propPanel = new AbsolutePanel();
-
- // stack Layout for left-side tree-view
- StackLayoutPanel stack = new StackLayoutPanel(Unit.EM);
-
- // create left tree-view panel
- stack.add(initNodeTree(), new HTML("Nodes"), 2);
- stack.add(initWrkflowTree(), new HTML("Workflow"), 2);
-
- initWidget();
-
- // Create a three-pane layout with splitters.
- SplitLayoutPanel p = new SplitLayoutPanel();
-
- Panel east = new AbsolutePanel();
-
- // Create a top panel under menu to hold button (e.g, generate xml)
- AbsolutePanel btnpanl = new AbsolutePanel();
- Button btn = createXMLButton();
- btnpanl.add(btn);
-
- p.addNorth(initMenu(), 30);
- p.addEast(east, 250);
- p.addSouth(propPanel, 300);
- p.addWest(stack, 150);
- p.addNorth(btnpanl, 30);
- ((OozieDiagramController) controller).setXmlPanel(east);
- p.add(controller.getView());
-
- // Attach the LayoutPanel to the RootLayoutPanel.
- RootLayoutPanel rp = RootLayoutPanel.get();
- rp.add(p);
-
- }
-
- /**
- * Create a "Generate XML" button
- *
- * @return
- */
- public Button createXMLButton() {
- Button btn = new Button("Generate XML");
- btn.addClickHandler(new ClickHandler() {
-
- @Override
- public void onClick(ClickEvent event) {
- ((OozieDiagramController) controller).generateXml();
- }
- });
- return btn;
- }
-
- /**
- * Initialize a default set of node widgets shown in a workflow design
- * panel, such as start, end, kill nodes
- */
- public void initWidget() {
-
- if (wrkflowtable == null) {
- wrkflowtable = new WrkflowPropertyTable(null);
- ((OozieDiagramController) controller).setWrkflowPropertyTable(wrkflowtable);
- }
-
- // display Start/End/Kill Nodes as default
- if (start == null) {
- start = new StartNodeWidget(this);
- controller.addWidget(start, 30, 100);
- dragController.makeDraggable(start);
- widgets.add(start);
- }
-
- if (end == null) {
- end = new EndNodeWidget(this);
- end.setName("End");
- controller.addWidget(end, 600, 100);
- dragController.makeDraggable(end);
- widgets.add(end);
- }
-
- if (kill == null) {
- kill = new KillNodeWidget(this);
- kill.setName("Kill");
- controller.addWidget(kill, 700, 100);
- dragController.makeDraggable(kill);
- widgets.add(kill);
- }
- }
-
- /**
- * Initialize workflow tree-view menu on left side
- *
- * @return
- */
- public Tree initWrkflowTree() {
- Tree t = new Tree();
- TreeItem actionTree = new TreeItem("Property");
- t.addItem(actionTree);
- t.addSelectionHandler(new SelectionHandler<TreeItem>() {
-
- @Override
- public void onSelection(SelectionEvent<TreeItem> event) {
- TreeItem item = event.getSelectedItem();
- String name = item.getText();
- if (name.equals("Property") && wrkflowtable != null) {
- setPropertyTable(wrkflowtable);
- }
- }
- });
-
- return t;
- }
-
- /**
- * Initialize node tree-view menu on left side
- *
- * @return
- */
- public Tree initNodeTree() {
-
- Tree t = new Tree();
-
- // Action Node Tree
- TreeItem actionTree = new TreeItem("Action Node");
- TreeItem mrTree = new TreeItem("MapReduce");
- mrTree.addItem("Streaming");
- mrTree.addItem("Pipes");
- actionTree.addItem(mrTree);
- actionTree.addItem("Pig");
- actionTree.addItem("Java");
- actionTree.addItem("FS");
- actionTree.addItem("Subworkflow");
- actionTree.addItem("SSH");
- actionTree.addItem("Shell");
- actionTree.addItem("Email");
-
- // Control Node Tree
- TreeItem controlTree = new TreeItem("Control Node");
- controlTree.addItem("Start");
- controlTree.addItem("End");
- controlTree.addItem("Kill");
- controlTree.addItem("Fork/Join");
- controlTree.addItem("Decision");
-
- t.addItem(actionTree);
- t.addItem(controlTree);
-
- // Event Handler
- t.addSelectionHandler(new SelectionHandler<TreeItem>() {
-
- @Override
- public void onSelection(SelectionEvent<TreeItem> event) {
- TreeItem item = event.getSelectedItem();
- String name = item.getText();
- if (name.equals("MapReduce")) {
- MapReduceActionWidget w = new MapReduceActionWidget(OozieWorkflowGenerator.this);
- w.setName("MR_".concat(nodeCount.get(NodeType.MAPREDUCE) != null ? nodeCount
- .get(NodeType.MAPREDUCE).toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- else if (name.equals("Streaming")) {
- StreamingActionWidget w = new StreamingActionWidget(OozieWorkflowGenerator.this);
- w.setName("Streaming_".concat(nodeCount.get(NodeType.STREAMING) != null ? nodeCount.get(
- NodeType.STREAMING).toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- else if (name.equals("Pipes")) {
- PipesActionWidget w = new PipesActionWidget(OozieWorkflowGenerator.this);
- w.setName("Pipes_".concat(nodeCount.get(NodeType.PIPES) != null ? nodeCount.get(NodeType.PIPES)
- .toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- else if (name.equals("Pig")) {
- PigActionWidget w = new PigActionWidget(OozieWorkflowGenerator.this);
- w.setName("Pig_".concat(nodeCount.get(NodeType.PIG) != null ? nodeCount.get(NodeType.PIG)
- .toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- else if (name.equals("Java")) {
- JavaActionWidget w = new JavaActionWidget(OozieWorkflowGenerator.this);
- w.setName("Java_".concat(nodeCount.get(NodeType.JAVA) != null ? nodeCount.get(NodeType.JAVA)
- .toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- else if (name.equals("FS")) {
- FSActionWidget w = new FSActionWidget(OozieWorkflowGenerator.this);
- w.setName("FS_".concat(nodeCount.get(NodeType.FS) != null ? nodeCount.get(NodeType.FS).toString()
- : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- else if (name.equals("SSH")) {
- SSHActionWidget w = new SSHActionWidget(OozieWorkflowGenerator.this);
- w.setName("SSH_".concat(nodeCount.get(NodeType.SSH) != null ? nodeCount.get(NodeType.SSH)
- .toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
-
- }
- else if (name.equals("Email")) {
- EmailActionWidget w = new EmailActionWidget(OozieWorkflowGenerator.this);
- w.setName("Email_".concat(nodeCount.get(NodeType.EMAIL) != null ? nodeCount.get(NodeType.EMAIL)
- .toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
-
- }
- else if (name.equals("Shell")) {
- ShellActionWidget w = new ShellActionWidget(OozieWorkflowGenerator.this);
- w.setName("Shell_".concat(nodeCount.get(NodeType.SHELL) != null ? nodeCount.get(NodeType.SHELL)
- .toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
-
- }
- else if (name.equals("Subworkflow")) {
- SubWFActionWidget w = new SubWFActionWidget(OozieWorkflowGenerator.this);
- w.setName("SubWF_".concat(nodeCount.get(NodeType.SUBWF) != null ? nodeCount.get(NodeType.SUBWF)
- .toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
-
- }
- else if (name.equals("Start")) {
- if (start == null) {
- StartNodeWidget w = new StartNodeWidget(OozieWorkflowGenerator.this);
- start = w;
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- }
- else if (name.equals("End")) {
- if (end == null) {
- EndNodeWidget w = new EndNodeWidget(OozieWorkflowGenerator.this);
- w.setName("End");
- end = w;
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- }
- else if (name.equals("Kill")) {
- if (kill == null) {
- KillNodeWidget w = new KillNodeWidget(OozieWorkflowGenerator.this);
- w.setName("Kill");
- kill = w;
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- }
- else if (name.equals("Fork/Join")) {
- ForkNodeWidget fork = new ForkNodeWidget(OozieWorkflowGenerator.this);
- fork.setName("Fork_".concat(nodeCount.get(NodeType.FORK) != null ? nodeCount.get(NodeType.FORK)
- .toString() : "0"));
- addWidget(fork, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
-
- JoinNodeWidget join = new JoinNodeWidget(OozieWorkflowGenerator.this);
- join.setName("Join_".concat(nodeCount.get(NodeType.JOIN) != null ? nodeCount.get(NodeType.JOIN)
- .toString() : "0"));
- addWidget(join, 90 + Random.nextInt(30), 30 + Random.nextInt(30));
-
- }
- else if (name.equals("Decision")) {
- DecisionNodeWidget w = new DecisionNodeWidget(OozieWorkflowGenerator.this);
- w.setName("Decision_".concat(nodeCount.get(NodeType.DECISION) != null ? nodeCount.get(
- NodeType.DECISION).toString() : "0"));
- addWidget(w, 30 + Random.nextInt(30), 30 + Random.nextInt(30));
- }
- }
- });
-
- return t;
- }
-
- /**
- * Initialize menu panel on top
- *
- * @return
- */
- public MenuBar initMenu() {
-
- // Menu bar
- Command cmd = new Command() {
- public void execute() {
- Window.alert("To be implemented soon");
- }
- };
-
- Command mr_cmd = new Command() {
- public void execute() {
- initWidget();
- MapReduceActionWidget mr = new MapReduceActionWidget(OozieWorkflowGenerator.this);
- mr.setName("MR_0");
- addWidget(mr, 300, 100);
- ((OozieDiagramController) controller).addConnection(start, mr);
- ((OozieDiagramController) controller).addConnection(mr, end);
- mr.updateOnSelection();
- }
- };
-
- Command pig_cmd = new Command() {
-
- public void execute() {
- clear();
- initWidget();
- PigActionWidget pig = new PigActionWidget(OozieWorkflowGenerator.this);
- pig.setName("Pig_0");
- addWidget(pig, 300, 100);
- ((OozieDiagramController) controller).addConnection(start, pig);
- ((OozieDiagramController) controller).addConnection(pig, end);
- pig.updateOnSelection();
- }
- };
-
- Command java_cmd = new Command() {
-
- public void execute() {
- clear();
- initWidget();
- JavaActionWidget java = new JavaActionWidget(OozieWorkflowGenerator.this);
- java.setName("Java_0");
- addWidget(java, 300, 100);
- ((OozieDiagramController) controller).addConnection(start, java);
- ((OozieDiagramController) controller).addConnection(java, end);
- java.updateOnSelection();
- }
- };
-
- Command forkjoin_cmd = new Command() {
-
- public void execute() {
- clear();
- initWidget();
- ForkNodeWidget fork = new ForkNodeWidget(OozieWorkflowGenerator.this);
- fork.setName("Fork_0");
- addWidget(fork, 150, 100);
- ((OozieDiagramController) controller).addConnection(start, fork);
-
- MapReduceActionWidget mr = new MapReduceActionWidget(OozieWorkflowGenerator.this);
- mr.setName("MR_0");
- addWidget(mr, 300, 30);
- ((OozieDiagramController) controller).addMultiConnection(fork, mr);
-
- PigActionWidget pig = new PigActionWidget(OozieWorkflowGenerator.this);
- pig.setName("Pig_0");
- addWidget(pig, 300, 200);
- ((OozieDiagramController) controller).addMultiConnection(fork, pig);
-
- JoinNodeWidget join = new JoinNodeWidget(OozieWorkflowGenerator.this);
- join.setName("Join_0");
- addWidget(join, 450, 100);
- ((OozieDiagramController) controller).addConnection(mr, join);
- ((OozieDiagramController) controller).addConnection(pig, join);
- ((OozieDiagramController) controller).addConnection(join, end);
-
- fork.updateOnSelection();
- join.updateOnSelection();
- mr.updateOnSelection();
- pig.updateOnSelection();
- }
- };
-
- Command clear_cmd = new Command() {
-
- public void execute() {
- clear();
- }
-
- };
-
- MenuBar fileMenu = new MenuBar(true);
- fileMenu.setAutoOpen(true);
- fileMenu.setAnimationEnabled(true);
- fileMenu.addItem("New", cmd);
- fileMenu.addItem("Open", cmd);
- fileMenu.addItem("Load XML", cmd);
- fileMenu.addItem("Save", cmd);
- fileMenu.addItem("Save As..", cmd);
- fileMenu.addItem("Generate XML", cmd);
- fileMenu.addItem("Print", cmd);
- fileMenu.addItem("Quit", cmd);
-
- MenuBar editMenu = new MenuBar(true);
- editMenu.setAutoOpen(true);
- editMenu.setAnimationEnabled(true);
- editMenu.addItem("Undo", cmd);
- editMenu.addItem("Redo", cmd);
- editMenu.addItem("Copy", cmd);
- editMenu.addItem("Cut", cmd);
- editMenu.addItem("Paste", cmd);
- editMenu.addItem("Duplicate", cmd);
- editMenu.addItem("Delete", cmd);
- editMenu.addItem("Clear Diagram", clear_cmd);
-
- MenuBar examples = new MenuBar(true);
- examples.setAutoOpen(true);
- examples.setAnimationEnabled(true);
- examples.addItem("wrkflow with MR action", mr_cmd);
- examples.addItem("wrkflow with Pig action", pig_cmd);
- examples.addItem("wrkflow with Java action", java_cmd);
- examples.addItem("wrkflow with Fork/Join ", forkjoin_cmd);
-
- MenuBar helpMenu = new MenuBar(true);
- helpMenu.setAutoOpen(true);
- helpMenu.setAnimationEnabled(true);
-
- // TODO this should point to a workflowgenerator's maven site, however there is no maven site available. (Not even in
- // Workspace of the jenkins job at https://builds.apache.org/job/oozie-trunk-precommit-build/ws/workflowgenerator/target/)
- // where client, for example, has target/site/apidocs
- // The ideal place is somewhere under http://oozie.apache.org/docs/ once it is generated.
- Command openOozieTopPageComman = new Command() {
- @Override
- public void execute() {
- Window.open("http://oozie.apache.org/", "_blank", "");
- }
- };
- helpMenu.addItem("Documentation", openOozieTopPageComman);
- helpMenu.addItem("Online Help", openOozieTopPageComman);
-
-
- Command aboutCommand = new Command() {
- @Override
- public void execute() {
- // Dialogbox
- final DialogBox d = new DialogBox(false, true);
- d.setGlassEnabled(true);
- d.setText("About Oozie Workflow Generator");
- d.center();
-
- // Set this to workaround the grid z-index issue https://issues.apache.org/jira/browse/OOZIE-1081
- d.getElement().getStyle().setZIndex(ZINDEX_FRONT_OF_GRID);
-
- // About text
- VerticalPanel vpanel = new VerticalPanel();
- vpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
- vpanel.setSpacing(10);
- vpanel.setWidth("150");
- vpanel.add(new Label("Oozie Workflow Generator"));
- vpanel.add(new Label("Version 3.4.0-SNAPSHOT")); // TODO how to get a version number from pom?
-
- // OK button to close
- Button ok = new Button("OK");
- ok.addClickHandler(new ClickHandler(){
- @Override
- public void onClick(ClickEvent event) {
- d.hide();
- }
-
- });
-
- vpanel.add(ok);
- d.setWidget(vpanel);
- d.show();
-
- }
- };
- helpMenu.addItem("About", aboutCommand);
-
- MenuBar menu = new MenuBar();
- menu.addItem("File", fileMenu);
- menu.addItem("Edit", editMenu);
- menu.addItem("Example", examples);
- menu.addItem("Help", helpMenu);
-
- return menu;
- }
-
- /**
- * Add a new node widget
- *
- * @param w node widget
- * @param x x-coordinate
- * @param y y-coordinate
- */
- public void addWidget(NodeWidget w, int x, int y) {
- controller.addWidget(w, x, y);
- changeNodeCount(w, true);
- dragController.makeDraggable(w);
- widgets.add(w);
- }
-
- /**
- * Remove a node widget
- *
- * @param w node widget
- */
- public void removeWidget(NodeWidget w) {
- controller.deleteWidget(w);
- widgets.remove(w);
- if (w instanceof StartNodeWidget) {
- start = null;
- }
- else if (w instanceof EndNodeWidget) {
- end = null;
- }
- else if (w instanceof KillNodeWidget) {
- kill = null;
- }
- changeNodeCount(w, false);
- }
-
- /**
- * Increment/Decrement count of node widget type
- *
- * @param w nodeWidget
- * @param increment true: increment, false: decrement
- */
- protected void changeNodeCount(NodeWidget w, boolean increment) {
- int i = 0;
- if (w instanceof MapReduceActionWidget) {
- if (nodeCount.containsKey(NodeType.MAPREDUCE)) {
- i = nodeCount.get(NodeType.MAPREDUCE);
- }
- updateNodeCountMap(NodeType.MAPREDUCE, increment, i);
- }
- else if (w instanceof PigActionWidget) {
- if (nodeCount.containsKey(NodeType.PIG)) {
- i = nodeCount.get(NodeType.PIG);
- }
- updateNodeCountMap(NodeType.PIG, increment, i);
- }
- else if (w instanceof JavaActionWidget) {
- if (nodeCount.containsKey(NodeType.JAVA)) {
- i = nodeCount.get(NodeType.JAVA);
- }
- updateNodeCountMap(NodeType.JAVA, increment, i);
- }
- else if (w instanceof FSActionWidget) {
- if (nodeCount.containsKey(NodeType.FS)) {
- i = nodeCount.get(NodeType.FS);
- }
- updateNodeCountMap(NodeType.FS, increment, i);
- }
- else if (w instanceof PipesActionWidget) {
- if (nodeCount.containsKey(NodeType.PIPES)) {
- i = nodeCount.get(NodeType.PIPES);
- }
- updateNodeCountMap(NodeType.PIPES, increment, i);
- }
- else if (w instanceof StreamingActionWidget) {
- if (nodeCount.containsKey(NodeType.STREAMING)) {
- i = nodeCount.get(NodeType.STREAMING);
- }
- updateNodeCountMap(NodeType.STREAMING, increment, i);
- }
- else if (w instanceof ShellActionWidget) {
- if (nodeCount.containsKey(NodeType.SHELL)) {
- i = nodeCount.get(NodeType.SHELL);
- }
- updateNodeCountMap(NodeType.SHELL, increment, i);
- }
- else if (w instanceof SSHActionWidget) {
- if (nodeCount.containsKey(NodeType.SSH)) {
- i = nodeCount.get(NodeType.SSH);
- }
- updateNodeCountMap(NodeType.SSH, increment, i);
- }
- else if (w instanceof EmailActionWidget) {
- if (nodeCount.containsKey(NodeType.EMAIL)) {
- i = nodeCount.get(NodeType.EMAIL);
- }
- updateNodeCountMap(NodeType.EMAIL, increment, i);
- }
- else if (w instanceof SubWFActionWidget) {
- if (nodeCount.containsKey(NodeType.SUBWF)) {
- i = nodeCount.get(NodeType.SUBWF);
- }
- updateNodeCountMap(NodeType.SUBWF, increment, i);
- }
- else if (w instanceof StartNodeWidget) {
- if (nodeCount.containsKey(NodeType.START)) {
- i = nodeCount.get(NodeType.START);
- }
- updateNodeCountMap(NodeType.START, increment, i);
- }
- else if (w instanceof EndNodeWidget) {
- if (nodeCount.containsKey(NodeType.END)) {
- i = nodeCount.get(NodeType.END);
- }
- updateNodeCountMap(NodeType.END, increment, i);
- }
- else if (w instanceof KillNodeWidget) {
- if (nodeCount.containsKey(NodeType.KILL)) {
- i = nodeCount.get(NodeType.KILL);
- }
- updateNodeCountMap(NodeType.KILL, increment, i);
- }
- else if (w instanceof ForkNodeWidget) {
- if (nodeCount.containsKey(NodeType.FORK)) {
- i = nodeCount.get(NodeType.FORK);
- }
- updateNodeCountMap(NodeType.FORK, increment, i);
- }
- else if (w instanceof JoinNodeWidget) {
- if (nodeCount.containsKey(NodeType.JOIN)) {
- i = nodeCount.get(NodeType.JOIN);
- }
- updateNodeCountMap(NodeType.JOIN, increment, i);
- }
- else if (w instanceof DecisionNodeWidget) {
- if (nodeCount.containsKey(NodeType.DECISION)) {
- i = nodeCount.get(NodeType.DECISION);
- }
- updateNodeCountMap(NodeType.DECISION, increment, i);
- }
- }
-
- private void updateNodeCountMap(NodeType type, boolean increment, int i) {
- if (increment) {
- nodeCount.put(type, i + 1);
- }
- else {
- nodeCount.put(type, i - 1);
- }
- }
-
- /**
- * Remove all node widgets in a workflow design panel
- */
- public void clear() {
- controller.clearDiagram();
- widgets.clear();
- nodeCount.clear();
- start = null;
- end = null;
- kill = null;
- }
-}
http://git-wip-us.apache.org/repos/asf/oozie/blob/aec39dd2/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/Property.java
----------------------------------------------------------------------
diff --git a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/Property.java b/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/Property.java
deleted file mode 100644
index 925befc..0000000
--- a/workflowgenerator/src/main/java/org/apache/oozie/tools/workflowgenerator/client/property/Property.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.tools.workflowgenerator.client.property;
-
-/**
- * class to provide key-value pair for property, mostly used in property table
- */
-public class Property {
-
- private String name;
- private String value;
-
- /**
- * Constructor which records name and value
- *
- * @param name name
- * @param value value
- */
- public Property(String name, String value) {
- this.name = name;
- this.value = value;
- }
-
- /**
- * Return a name of property
- *
- * @return
- */
- public String getName() {
- return name;
- }
-
- /**
- * Set a name of property
- *
- * @param name
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Return a value of property
- *
- * @return
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Set a value of property
- *
- * @param value
- */
- public void setValue(String value) {
- this.value = value;
- }
-}