[jboss-svn-commits] JBL Code SVN: r7590 - in labs/jbossesb/trunk/product/console: resources/WEB-INF resources/WEB-INF/classes src/org/jboss/soa/esb/admin/console/transform view view/transform
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Nov 14 11:01:40 EST 2006
Author: tfennelly
Date: 2006-11-14 11:01:29 -0500 (Tue, 14 Nov 2006)
New Revision: 7590
Added:
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ManageResourceSpecs.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResourceSpec.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameterSpec.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceSpec.java
labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter-spec.xhtml
labs/jbossesb/trunk/product/console/view/transform/list-resource-specs.xhtml
labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-select-spec.xhtml
labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-spec-create.xhtml
Modified:
labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml
labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml
labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResource.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResource.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java
labs/jbossesb/trunk/product/console/view/home.xhtml
labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter.xhtml
labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-create.xhtml
Log:
Added Resource Specifications (Templates)
Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -18,5 +18,7 @@
<mapping class="org.jboss.soa.esb.admin.console.contract.MessageContract"/>
<mapping class="org.jboss.soa.esb.admin.console.transform.TransformationResource"/>
<mapping class="org.jboss.soa.esb.admin.console.transform.TransformationResourceParameter"/>
+ <mapping class="org.jboss.soa.esb.admin.console.transform.TransformationResourceSpec"/>
+ <mapping class="org.jboss.soa.esb.admin.console.transform.TransformationResourceParameterSpec"/>
</session-factory>
</hibernate-configuration>
Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -5,9 +5,9 @@
<property name="debug">true</property>
</component>
- <!-- 120 second conversation timeout -->
+ <!-- 1200 second conversation timeout -->
<component name="org.jboss.seam.core.manager">
- <property name="conversationTimeout">120000</property>
+ <property name="conversationTimeout">1200000</property>
</component>
<!-- Bootstrap Hibernate -->
Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -62,6 +62,18 @@
</navigation-case>
<navigation-case>
+ <from-outcome>new-trans-resource-select-spec</from-outcome>
+ <to-view-id>/transform/new-trans-resource-select-spec.xhtml</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>add-resource-parameter</from-outcome>
+ <to-view-id>/transform/add-resource-parameter.xhtml</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
<from-outcome>new-trans-resource-create</from-outcome>
<to-view-id>/transform/new-trans-resource-create.xhtml</to-view-id>
<redirect />
@@ -74,6 +86,18 @@
</navigation-case>
<navigation-case>
+ <from-outcome>new-trans-resource-spec-create</from-outcome>
+ <to-view-id>/transform/new-trans-resource-spec-create.xhtml</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>list-resource-specs</from-outcome>
+ <to-view-id>/transform/list-resource-specs.xhtml</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
<from-outcome>list-resources</from-outcome>
<to-view-id>/transform/list-resources.xhtml</to-view-id>
<redirect />
Added: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ManageResourceSpecs.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ManageResourceSpecs.java 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ManageResourceSpecs.java 2006-11-14 16:01:29 UTC (rev 7590)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.admin.console.transform;
+
+import static org.jboss.seam.ScopeType.CONVERSATION;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.hibernate.Session;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.Conversational;
+import org.jboss.seam.annotations.End;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelectionIndex;
+
+/**
+ * Manage <a href="http://milyn.codehaus.org/Smooks">Smooks</a> resource configuration specifications.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+ at Name("manageResourceSpecs")
+ at Scope(CONVERSATION)
+ at Conversational(ifNotBegunOutcome="home")
+public class ManageResourceSpecs implements Serializable {
+
+ @In(create=true)
+ private Session esbDatabase;
+
+ @DataModel
+ private List<TransformationResourceSpec> configurationSpecs;
+ @DataModelSelectionIndex("configurationSpecs")
+ int configurationSpecIndex = 0;
+
+ @Begin(join=true)
+ public String list() {
+ initialise();
+
+ return "list-resource-specs";
+ }
+
+ public String deleteConfiguration() {
+ TransformationResourceSpec selectedConfig = configurationSpecs.get(configurationSpecIndex);
+
+ for(TransformationResourceParameterSpec parameter : selectedConfig.getParameters()) {
+ esbDatabase.delete(parameter);
+ }
+ esbDatabase.delete(selectedConfig);
+ initialise();
+
+ return "list-resource-spec";
+ }
+
+ @End
+ public String close() {
+ return "home";
+ }
+
+ /**
+ * Initialise the message flow configurations list.
+ */
+ private void initialise() {
+ // Read all resources config specs from the DB...
+ configurationSpecs = esbDatabase.createQuery("from TransformationResourceSpec order by name").list();
+ }
+}
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResource.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResource.java 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResource.java 2006-11-14 16:01:29 UTC (rev 7590)
@@ -36,6 +36,8 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelectionIndex;
+import org.jboss.seam.core.FacesMessages;
import org.jboss.soa.esb.admin.console.SeamUtils;
import org.jboss.soa.esb.admin.console.transform.flow.MessageFlow;
import org.jboss.soa.esb.admin.console.transform.flow.MessageFlowSelected;
@@ -56,7 +58,23 @@
@In
private MessageFlow messageFlow;
+ @DataModel
+ private List<TransformationResourceSpec> configurationSpecs;
+ @DataModelSelectionIndex("configurationSpecs")
+ int configurationSpecIndex = 0;
+
+ @In(required=false) @Out(required=false)
+ private TransformationResourceSpec selectedConfigSpec;
+
+ @DataModel
+ private List<TransformationResourceParameterSpec> selectedSpecParams;
+ @DataModelSelectionIndex("selectedSpecParams")
+ int selectedSpecParamIndex = 0;
+
@In(create=true) @Out
+ private TransformationResourceParameterSpec transResourceParameterSpec;
+
+ @In(create=true) @Out
private TransformationResource transResource;
@In(create=true) @Out
@@ -66,24 +84,51 @@
private List<TransformationResourceParameter> parameterList;
@Begin(join=true)
+ public String selectResourceSpec() {
+ configurationSpecs = esbDatabase.createQuery("from TransformationResourceSpec order by name").list();
+ return "new-trans-resource-select-spec";
+ }
+
public String captureResourceDetailsConfiguration() {
- // Create the new resource and set the useragent...
- transResource = new TransformationResource();
+ selectedConfigSpec = configurationSpecs.get(configurationSpecIndex);
+ selectedSpecParams = selectedConfigSpec.getParameters();
+
+ // Create the new resource from the selected spec and set the useragent...
+ transResource = selectedConfigSpec.toTransformationResource();
+ parameterList = transResource.getParameters();
transResource.setUseragent(messageFlow.getFlowUseragentString());
-
- parameterList = new ArrayList<TransformationResourceParameter>();
- transResource.setParameters(parameterList);
return "new-trans-resource-create";
}
+ public String selectParameterSpec() {
+ transResourceParameterSpec = selectedSpecParams.get(selectedSpecParamIndex);
+ transResourceParameter.setName(transResourceParameterSpec.getName());
+ transResourceParameter.setType(transResourceParameterSpec.getType());
+
+ return "add-resource-parameter";
+ }
+
public String addParameter() {
- parameterList.add(transResourceParameter);
+ if(!parameterList.contains(transResourceParameter)) {
+ // Protected against the parameter being added more than once. I've seen this
+ // happen occassionaly.
+ parameterList.add(transResourceParameter);
+ }
transResourceParameter = new TransformationResourceParameter();
return "new-trans-resource-create";
}
+ public String targetConfig() {
+ // Verify that all required parameters have been specified...
+ if(!assertAllRequiredParamsSet()) {
+ return null;
+ }
+
+ return "new-trans-resource-target";
+ }
+
public String cancelAddParameter() {
return "new-trans-resource-create";
}
@@ -104,6 +149,23 @@
return "error";
}
}
+
+ /**
+ * Assert that all parameters that have been defined as "required" on the resource spec
+ * are set.
+ */
+ private boolean assertAllRequiredParamsSet() {
+ for(TransformationResourceParameterSpec paramSpec : selectedSpecParams) {
+ if(paramSpec.isRequired()) {
+ if(!TransformationResource.isParamaterSet(paramSpec.getName(), transResource)) {
+ FacesMessages.instance().add("Required execution parameter '" + paramSpec.getName() + "' not set.");
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
@End
public String cancel() {
Added: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResourceSpec.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResourceSpec.java 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResourceSpec.java 2006-11-14 16:01:29 UTC (rev 7590)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.admin.console.transform;
+
+import static org.jboss.seam.ScopeType.CONVERSATION;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.Session;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.Conversational;
+import org.jboss.seam.annotations.End;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.soa.esb.admin.console.SeamUtils;
+import org.jboss.soa.esb.admin.console.transform.flow.MessageFlow;
+import org.jboss.soa.esb.admin.console.transform.flow.MessageFlowSelected;
+
+/**
+ * Add Transformation Resource Specification action handler.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+ at Name("newResourceSpec")
+ at Scope(CONVERSATION)
+ at Conversational(ifNotBegunOutcome="home")
+public class NewResourceSpec implements Serializable {
+
+ @In(create=true)
+ private Session esbDatabase;
+
+ @In(create=true) @Out
+ private TransformationResourceSpec transResourceSpec;
+
+ @In(create=true) @Out
+ private TransformationResourceParameterSpec transResourceParameterSpec;
+
+ @DataModel
+ private List<TransformationResourceParameterSpec> parameterList;
+
+ @Begin(join=true)
+ public String captureResourceDetailsConfiguration() {
+ // Create the new resource and set the useragent...
+ transResourceSpec = new TransformationResourceSpec();
+
+ parameterList = new ArrayList<TransformationResourceParameterSpec>();
+ transResourceSpec.setParameters(parameterList);
+
+ return "new-trans-resource-spec-create";
+ }
+
+ public String addParameter() {
+ if(!parameterList.contains(transResourceParameterSpec)) {
+ // Protected against the parameter being added more than once. I've seen this
+ // happen occassionaly.
+ parameterList.add(transResourceParameterSpec);
+ }
+ transResourceParameterSpec = new TransformationResourceParameterSpec();
+
+ return "new-trans-resource-spec-create";
+ }
+
+ public String cancelAddParameter() {
+ return "new-trans-resource-spec-create";
+ }
+
+ @End
+ public String save() {
+ try {
+ // Persist...
+ esbDatabase.persist(transResourceSpec);
+ for(TransformationResourceParameterSpec parameter : transResourceSpec.getParameters()) {
+ parameter.setResourceSpec(transResourceSpec);
+ esbDatabase.persist(parameter);
+ }
+
+ return "home";
+ } catch(RuntimeException thrown) {
+ SeamUtils.printContexts();
+ throw thrown;
+ }
+ }
+
+ @End
+ public String cancel() {
+ return "home";
+ }
+}
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResource.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResource.java 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResource.java 2006-11-14 16:01:29 UTC (rev 7590)
@@ -43,6 +43,7 @@
private static final long serialVersionUID = 1L;
private String id;
+ private String name;
private String useragent;
private String selector;
private String namespace;
@@ -127,4 +128,38 @@
public void setUseragent(String useragent) {
this.useragent = useragent;
}
+
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Is the specified parameter configured on the supplied transformation resource configuration.
+ * @param paramName The parameter to check for.
+ * @param transResource The resource to check.
+ * @return True if the parameter is set, otherwise false.
+ */
+ public static boolean isParamaterSet(String paramName, TransformationResource transResource) {
+ if(transResource.parameters == null || transResource.parameters.isEmpty()) {
+ return false;
+ }
+
+ for(TransformationResourceParameter param : transResource.getParameters()) {
+ if(param.getName().equals(paramName)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
}
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java 2006-11-14 16:01:29 UTC (rev 7590)
@@ -45,6 +45,7 @@
private String id;
private TransformationResource transResource;
private String name;
+ private String type;
private byte[] value;
public TransformationResourceParameter() {
@@ -133,4 +134,18 @@
public void setValue(byte[] value) {
this.value = value;
}
+
+ /**
+ * @return Returns the type.
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * @param type The type to set.
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
}
Added: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameterSpec.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameterSpec.java 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameterSpec.java 2006-11-14 16:01:29 UTC (rev 7590)
@@ -0,0 +1,200 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.admin.console.transform;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.Transient;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.validator.NotNull;
+import org.jboss.seam.annotations.Name;
+
+/**
+ * Transformation Resource Parameter Specification Spec.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+ at Entity
+ at Name("transResourceParameterSpec")
+public class TransformationResourceParameterSpec implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private String id;
+ private String name;
+ private byte[] description;
+ private boolean required;
+ private String type;
+ private byte[] value;
+ private TransformationResourceSpec resourceSpec;
+
+ /**
+ * @return Returns the description.
+ */
+ public byte[] getDescription() {
+ return description;
+ }
+ /**
+ * @param description The description to set.
+ */
+ public void setDescription(byte[] description) {
+ this.description = description;
+ }
+
+ @NotNull
+ @Transient
+ public String getDescriptionAsString() {
+ if(description == null) {
+ return null;
+ }
+ return new String(description);
+ }
+ public void setDescriptionAsString(String description) {
+ if(description == null) {
+ this.description = null;
+ }
+ this.description = description.getBytes();
+ }
+
+ /**
+ * @return Returns the id.
+ */
+ @Id @GeneratedValue(generator="system-uuid")
+ @GenericGenerator(name="system-uuid", strategy = "uuid")
+ public String getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return Returns the required.
+ */
+ public boolean isRequired() {
+ return required;
+ }
+ /**
+ * @param required The required to set.
+ */
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+ /**
+ * @return Returns the resourceSpec.
+ */
+ @ManyToOne
+ public TransformationResourceSpec getResourceSpec() {
+ return resourceSpec;
+ }
+ /**
+ * @param resourceSpec The resourceSpec to set.
+ */
+ public void setResourceSpec(TransformationResourceSpec resourceSpec) {
+ this.resourceSpec = resourceSpec;
+ }
+ /**
+ * @return Returns the value.
+ */
+ public byte[] getValue() {
+ return value;
+ }
+ /**
+ * @param value The value to set.
+ */
+ public void setValue(byte[] value) {
+ this.value = value;
+ }
+ /**
+ * @return Returns the valueAsString.
+ */
+ @NotNull
+ @Transient
+ public String getValueAsString() {
+ if(value == null) {
+ return null;
+ }
+ return new String(value);
+ }
+ /**
+ * @param valueAsString The valueAsString to set.
+ */
+ public void setValueAsString(String value) {
+ if(value == null) {
+ this.value = null;
+ }
+ this.value = value.getBytes();
+ }
+ /**
+ * @return Returns the type.
+ */
+ public String getType() {
+ return type;
+ }
+ /**
+ * @param type The type to set.
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Construc a TransformationResourceParameter instance from this spec.
+ * @return The TransformationResourceParameter instance.
+ */
+ @Transient
+ public Object toTransformationResourceParameter() {
+ TransformationResourceParameter parameter = new TransformationResourceParameter();
+
+ parameter.setName(getName());
+ parameter.setType(getType());
+ parameter.setValue(getValue());
+
+ return parameter;
+ }
+
+ /**
+ * Is the value of this parameter preset from the specification.
+ * @return True if the value is preset, otherwise false.
+ */
+ @Transient
+ public boolean isPreset() {
+ return (value != null && value.length > 0);
+ }
+}
Added: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceSpec.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceSpec.java 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceSpec.java 2006-11-14 16:01:29 UTC (rev 7590)
@@ -0,0 +1,197 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.admin.console.transform;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.OrderBy;
+import javax.persistence.Transient;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.validator.NotNull;
+import org.jboss.seam.annotations.Name;
+
+/**
+ * Transformation Resource Specification.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+ at Entity
+ at Name("transResourceSpec")
+public class TransformationResourceSpec implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private String id;
+ private String name;
+ private byte[] description;
+ private String path;
+ private String selector;
+ private String namespace;
+ private String reference;
+ private List<TransformationResourceParameterSpec> parameters;
+
+ /**
+ * @return Returns the id.
+ */
+ @Id @GeneratedValue(generator="system-uuid")
+ @GenericGenerator(name="system-uuid", strategy = "uuid")
+ public String getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the namespace.
+ */
+ public String getNamespace() {
+ return namespace;
+ }
+ /**
+ * @param namespace The namespace to set.
+ */
+ public void setNamespace(String namespace) {
+ this.namespace = namespace;
+ }
+ /**
+ * @return Returns the parameters.
+ */
+ @OneToMany(mappedBy="resourceSpec")
+ @OrderBy("value") // to force the unset and preset specs to be grouped seperately
+ public List<TransformationResourceParameterSpec> getParameters() {
+ return parameters;
+ }
+ /**
+ * @param parameters The parameters to set.
+ */
+ public void setParameters(List<TransformationResourceParameterSpec> parameters) {
+ this.parameters = parameters;
+ }
+ /**
+ * @return Returns the path.
+ */
+ public String getPath() {
+ return path;
+ }
+ /**
+ * @param path The path to set.
+ */
+ public void setPath(String path) {
+ this.path = path;
+ }
+ /**
+ * @return Returns the selector.
+ */
+ public String getSelector() {
+ return selector;
+ }
+ /**
+ * @param selector The selector to set.
+ */
+ public void setSelector(String selector) {
+ this.selector = selector;
+ }
+ /**
+ * @return Returns the description.
+ */
+ public byte[] getDescription() {
+ return description;
+ }
+ /**
+ * @param description The description to set.
+ */
+ public void setDescription(byte[] description) {
+ this.description = description;
+ }
+ @NotNull
+ @Transient
+ public String getDescriptionAsString() {
+ if(description == null) {
+ return null;
+ }
+ return new String(description);
+ }
+ public void setDescriptionAsString(String description) {
+ if(description == null) {
+ this.description = null;
+ }
+ this.description = description.getBytes();
+ }
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return Returns the reference.
+ */
+ public String getReference() {
+ return reference;
+ }
+ /**
+ * @param reference The reference to set.
+ */
+ public void setReference(String reference) {
+ this.reference = reference;
+ }
+
+ /**
+ * Construct a {@link TransformationResource} instance from this spec.
+ * @return The {@link TransformationResource} instance.
+ */
+ @Transient
+ public TransformationResource toTransformationResource() {
+ TransformationResource transResource = new TransformationResource();
+
+ transResource.setName(getName());
+ transResource.setPath(getPath());
+ transResource.setSelector(getSelector());
+ transResource.setNamespace(getNamespace());
+
+ // Copy over the preset resource execution parameters...
+ List parameterList = new ArrayList<TransformationResourceParameter>();
+ transResource.setParameters(parameterList);
+ for(TransformationResourceParameterSpec spec : getParameters()) {
+ if(spec.isPreset()) {
+ parameterList.add(spec.toTransformationResourceParameter());
+ }
+ }
+
+
+ return transResource;
+ }
+}
Modified: labs/jbossesb/trunk/product/console/view/home.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/home.xhtml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/view/home.xhtml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -21,9 +21,13 @@
<div class="section">
<h2>Transformation Configurations:</h2>
<ul>
- <li><s:link action="#{newResource.captureResourceDetailsConfiguration}" value="Configure New Transformation/Analysis Resource" /></li>
- <li><s:link action="#{manageResources.list}" value="Manage Transformation/Analysis Configurations" /></li>
+ <li><s:link action="#{newResource.selectResourceSpec}" value="Configure New Resource" /></li>
+ <li><s:link action="#{manageResources.list}" value="Manage Configurations" /></li>
</ul>
+ <ul>
+ <li><s:link action="#{newResourceSpec.captureResourceDetailsConfiguration}" value="Configure New Resource Specification" /></li>
+ <li><s:link action="#{manageResourceSpecs.list}" value="Manage Resource Specifications" /></li>
+ </ul>
</div>
</ui:define>
Added: labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter-spec.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter-spec.xhtml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter-spec.xhtml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -0,0 +1,80 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ template="template.xhtml">
+
+<!-- content -->
+<ui:define name="content">
+ <h:form>
+ <s:validateAll>
+ <div class="section">
+ <h2>Add Resource Parameter Spec</h2>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Name">Name:</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Name" value="#{transResourceParameterSpec.name}" required="true" />
+ <br/><span class="errors"><h:message for="Name" /></span>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Description">Description:</h:outputLabel></div>
+ <div class="input">
+ <h:inputTextarea id="Description" value="#{transResourceParameterSpec.descriptionAsString}" cols="100" rows="5" required="true" />
+ <br/><span class="errors"><h:message for="Description" /></span>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Required">Required:</h:outputLabel></div>
+ <div id="radio" class="input">
+ <h:selectOneRadio id="Required" value="#{transResourceParameterSpec.required}" layout="vertical" required="true" >
+ <f:selectItem itemLabel="Yes" itemValue="true"/>
+ <f:selectItem itemLabel="No" itemValue="false"/>
+ </h:selectOneRadio>
+ <br/>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Type">Type:</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Type" value="#{transResourceParameterSpec.type}" />
+ <br/><span class="errors"><h:message for="Type" /></span>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Value">Value:</h:outputLabel></div>
+ <div class="input">
+ <h:inputTextarea id="Value" value="#{transResourceParameterSpec.valueAsString}" cols="100" rows="30" />
+ <br/><span class="errors"><h:message for="Value" /></span>
+ </div>
+ </div>
+ <div class="entry errors"><h:messages globalOnly="true"/></div>
+
+ <div class="entry">
+ <div class="label"><f:verbatim> </f:verbatim></div>
+ <div class="input">
+ <h:commandButton value="Add" action="#{newResourceSpec.addParameter}" class="button"/>
+ </div>
+ </div>
+ </div>
+ </s:validateAll>
+ </h:form>
+ <h:form>
+ <div class="section">
+ <div class="entry">
+ <div class="label"><f:verbatim> </f:verbatim></div>
+ <div class="input">
+ <h:commandButton value="Cancel" action="#{newResourceSpec.cancelAddParameter}" class="button"/>
+ </div>
+ </div>
+ </div>
+ </h:form>
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+</ui:define>
+
+</ui:composition>
Modified: labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter.xhtml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter.xhtml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -15,14 +15,21 @@
<div class="entry">
<div class="label"><h:outputLabel for="Name">Name:</h:outputLabel></div>
<div class="input">
- <h:inputText id="Name" value="#{transResourceParameter.name}" required="true" />
+ <h:inputText id="Name" value="#{transResourceParameter.name}" disabled="true" />
<br/><span class="errors"><h:message for="Name" /></span>
</div>
</div>
<div class="entry">
+ <div class="label"><h:outputLabel for="Description">Description:</h:outputLabel></div>
+ <div class="input">
+ <h:inputTextarea id="Description" value="#{transResourceParameterSpec.descriptionAsString}" cols="100" rows="5" disabled="true" />
+ <br/><span class="errors"><h:message for="Description" /></span>
+ </div>
+ </div>
+ <div class="entry">
<div class="label"><h:outputLabel for="Value">Value:</h:outputLabel></div>
<div class="input">
- <h:inputTextarea id="Value" value="#{transResourceParameter.valueAsString}" cols="100" rows="30" required="true" />
+ <h:inputTextarea id="Value" value="#{transResourceParameter.valueAsString}" cols="100" rows="20" required="true" />
<br/><span class="errors"><h:message for="Value" /></span>
</div>
</div>
Added: labs/jbossesb/trunk/product/console/view/transform/list-resource-specs.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/list-resource-specs.xhtml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/view/transform/list-resource-specs.xhtml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -0,0 +1,53 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ template="template.xhtml">
+
+<!-- content -->
+<ui:define name="content">
+ <div class="section">
+ <fieldset>
+ <h:form>
+ <h2>Manage Resource Configuration Specifications</h2>
+ <div class="section">
+ This wizard lists all Transformation/Analysis Resource Configuration Specifications.
+ </div>
+ <div class="section">
+ <h:outputText value="There are no Resource Configuration Specifications!" rendered="#{configurationSpecs != null and configurationSpecs.rowCount==0}"/>
+ <h:dataTable value="#{configurationSpecs}" var="configSelection" rendered="#{configurationSpecs.rowCount>0}">
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ #{configSelection.name}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Description</f:facet>
+ #{configSelection.descriptionAsString}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Reference Data</f:facet>
+ <h:outputLink value="#{configSelection.reference}" rendered="#{configSelection.reference != null}">Reference...</h:outputLink>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Manage</f:facet>
+ <h:commandLink action="#{manageResourceSpecs.deleteConfiguration}">Delete</h:commandLink>
+ </h:column>
+ </h:dataTable>
+ </div>
+ </h:form>
+ <h:form>
+ <div class="section">
+ <s:link action="#{manageResourceSpecs.close}" value="Done" linkStyle="button" buttonClass="button" />
+ </div>
+ </h:form>
+ </fieldset>
+</div>
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+</ui:define>
+
+</ui:composition>
\ No newline at end of file
Modified: labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-create.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-create.xhtml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-create.xhtml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -9,28 +9,45 @@
<!-- content -->
<ui:define name="content">
<div class="section">
- <h:form>
<fieldset>
<h:form>
<s:validateAll>
<h2>Configure New Resource</h2>
<div class="section">
- Define the resource configuration by specifying the Transformation/Analysis Resource and its execution Parameter Set. The
- Resource can be a Java class for performing DOM based transformation/analysis
- (see <a href="http://milyn.codehaus.org/javadoc/smooks">ElementVisitor</a>), an XSL Transformation template (XSLT) defined
- in a .xsl file, or any other supported transformation technology (see <a href="http://milyn.codehaus.org/javadoc/smooks">ContentDeliveryUnitCreator</a>).
- All XML based transformation/analysis resources are targeted at message fragments, giving more fine grained control.
- </div>
- <div class="section">
<div class="entry">
+ <div class="label"><h:outputLabel for="Name">Resource Name:</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Name" value="#{transResource.name}" size="50" disabled="true" />
+ <br/><span class="errors"><h:message for="Name" /></span>
+ </div>
+ </div>
+ <div class="entry">
<div class="label"><h:outputLabel for="Resource">Applied Resource:</h:outputLabel></div>
<div class="input">
- <h:inputText id="Resource" value="#{transResource.path}" size="100" />
+ <h:inputText id="Resource" value="#{transResource.path}" size="100" disabled="#{transResource.path != null}"/>
<br/><span class="errors"><h:message for="Resource" /></span>
</div>
</div>
+ <div class="entry">
+ <div class="label">Set Execution Patameters:</div>
+ <div class="output">
+ <h:outputText value="No Parameters" rendered="#{selectedSpecParams != null and selectedSpecParams.rowCount==0}"/>
+ <h:dataTable value="#{selectedSpecParams}" var="parameterSpecSelection" rendered="#{selectedSpecParams.rowCount>0}">
+ <h:column>
+ #{parameterSpecSelection.name}
+ </h:column>
+ <h:column>
+ <h:outputText value="required" rendered="#{parameterSpecSelection.required}"/>
+ <f:verbatim rendered="#{!parameterSpecSelection.required}"> </f:verbatim>
+ </h:column>
+ <h:column>
+ <h:commandLink action="#{newResource.selectParameterSpec}" rendered="#{!parameterSpecSelection.preset}">Set</h:commandLink>
+ <h:outputText value="Preset (see below)" rendered="#{parameterSpecSelection.preset}"/>
+ </h:column>
+ </h:dataTable>
+ </div>
+ </div>
</div>
-
<div class="section">
<h:dataTable value="#{parameterList}" var="parameterSelection" rendered="#{parameterList.rowCount>0}">
<h:column>
@@ -50,20 +67,13 @@
<div class="entry">
<div class="label"><f:verbatim> </f:verbatim></div>
<div class="input">
- <h:commandButton value="Add Resource Parameter..." action="/transform/add-resource-parameter.xhtml" class="button"/>
+ <h:commandButton value="Target Configuration..." action="#{newResource.targetConfig}" class="button"/>
</div>
</div>
- <div class="entry">
- <div class="label"><f:verbatim> </f:verbatim></div>
- <div class="input">
- <h:commandButton value="Next..." action="/transform/new-trans-resource-target.xhtml" class="button"/>
- </div>
- </div>
</div>
</s:validateAll>
</h:form>
</fieldset>
- </h:form>
<h:form>
<div class="section">
<div class="entry">
Added: labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-select-spec.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-select-spec.xhtml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-select-spec.xhtml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -0,0 +1,59 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ template="template.xhtml">
+
+<!-- content -->
+<ui:define name="content">
+ <div class="section">
+ <fieldset>
+ <h:form>
+ <h2>Configure New Resource</h2>
+ <div class="section">
+ Define the resource configuration by selecting a Resource Specification from the following list and
+ filling in the details.
+ </div>
+ <div class="section">
+ <h:outputText value="There are no Resource Configuration Specifications!" rendered="#{configurationSpecs != null and configurationSpecs.rowCount==0}"/>
+ <h:dataTable value="#{configurationSpecs}" var="configSelection" rendered="#{configurationSpecs.rowCount>0}">
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ #{configSelection.name}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Description</f:facet>
+ #{configSelection.descriptionAsString}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Reference Data</f:facet>
+ <h:outputLink value="#{configSelection.reference}" rendered="#{configSelection.reference != null}">Reference...</h:outputLink>
+ </h:column>
+ <h:column>
+ <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
+ <h:commandLink action="#{newResource.captureResourceDetailsConfiguration}">Select</h:commandLink>
+ </h:column>
+ </h:dataTable>
+ </div>
+ </h:form>
+ <h:form>
+ <div class="section">
+ <s:link action="#{manageResourceSpecs.close}" value="Done" linkStyle="button" buttonClass="button" />
+ </div>
+ </h:form>
+ </fieldset>
+</div>
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+ <b><h:form><h:commandButton value="Set Message Flow" action="#{messageFlowSelect.showFromEPRs}" /></h:form></b>
+ <p/>
+ <h1>Create Transformation/Analysis Configuration</h1>
+ Create a message transformation/analysis configuration for the chosen Message Flow.
+ <p/>
+</ui:define>
+
+</ui:composition>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-spec-create.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-spec-create.xhtml 2006-11-14 15:56:22 UTC (rev 7589)
+++ labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-spec-create.xhtml 2006-11-14 16:01:29 UTC (rev 7590)
@@ -0,0 +1,126 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ template="template.xhtml">
+
+<!-- content -->
+<ui:define name="content">
+ <div class="section">
+ <h:form>
+ <fieldset>
+ <h:form>
+ <s:validateAll>
+ <h2>Configure New Resource Specification</h2>
+ <div class="section">
+ Define the Resource Configuration "Spec" by specifying details about the Transformation/Analysis Resource, as well
+ as details about its execution Parameter Set. Resource Configuration Specifications are used to template and validate
+ new message targeted Transformation/Analysis resources.
+ <p/>
+ The Resource can be a Java class for performing DOM based transformation/analysis
+ (see <a href="http://milyn.codehaus.org/javadoc/smooks">ElementVisitor</a>), an XSL Transformation template (XSLT) defined
+ in a .xsl file, or any other supported transformation technology (see <a href="http://milyn.codehaus.org/javadoc/smooks">ContentDeliveryUnitCreator</a>).
+ All XML based transformation/analysis resources are targeted at message fragments, giving more fine grained control.
+ </div>
+ <div class="section">
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Name">Name:</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Name" value="#{transResourceSpec.name}" size="50" required="true" />
+ <br/><span class="errors"><h:message for="Name" /></span>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Description">Description:</h:outputLabel></div>
+ <div class="input">
+ <h:inputTextarea id="Description" value="#{transResourceSpec.descriptionAsString}" cols="100" rows="5" required="true" />
+ <br/><span class="errors"><h:message for="Description" /></span>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Resource">Applied Resource (e.g. class, xsl):</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Resource" value="#{transResourceSpec.path}" size="100" />
+ <br/><span class="errors"><h:message for="Resource" /></span>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Reference">Resource Reference (e.g. docs web link):</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Reference" value="#{transResourceSpec.reference}" size="100" />
+ <br/><span class="errors"><h:message for="Reference" /></span>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Selector">Execution Selector:</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Selector" value="#{transResourceSpec.selector}" size="50" />
+ <br/><span class="errors"><h:message for="Selector" /></span>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Selector-Namespace">Execution Selector Namespace:</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Selector-Namespace" value="#{transResourceSpec.namespace}" size="50" />
+ <br/><span class="errors"><h:message for="Selector-Namespace" /></span>
+ </div>
+ </div>
+ </div>
+
+ <div class="section">
+ <h:dataTable value="#{parameterList}" var="parameterSelection" rendered="#{parameterList.rowCount>0}">
+ <h:column>
+ <f:facet name="header">Parameter Name</f:facet>
+ #{parameterSelection.name}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Parameter Description</f:facet>
+ <pre>#{parameterSelection.descriptionAsString}</pre>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Required</f:facet>
+ <pre>#{parameterSelection.required}</pre>
+ </h:column>
+ </h:dataTable>
+ </div>
+
+ <div class="section">
+ <div class="entry errors"><h:messages globalOnly="true"/></div>
+
+ <div class="entry">
+ <div class="label"><f:verbatim> </f:verbatim></div>
+ <div class="input">
+ <h:commandButton value="Add Resource Parameter Spec..." action="/transform/add-resource-parameter-spec.xhtml" class="button"/>
+ </div>
+ </div>
+ </div>
+ </s:validateAll>
+ </h:form>
+ </fieldset>
+ </h:form>
+ <h:form>
+ <div class="section">
+ <div class="entry">
+ <div class="label"><f:verbatim> </f:verbatim></div>
+ <div class="input">
+ <h:commandButton value="Save" action="#{newResourceSpec.save}" class="button"/>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><f:verbatim> </f:verbatim></div>
+ <div class="input">
+ <h:commandButton value="Cancel" action="#{newResourceSpec.cancel}" class="button"/>
+ </div>
+ </div>
+ </div>
+ </h:form>
+</div>
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+</ui:define>
+
+</ui:composition>
More information about the jboss-svn-commits
mailing list