You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2008/03/18 20:13:59 UTC
svn commit: r638513 - in /ofbiz/trunk/framework/webtools:
src/org/ofbiz/webtools/artifactinfo/ webapp/webtools/WEB-INF/
webapp/webtools/WEB-INF/actions/artifactinfo/ webapp/webtools/artifactinfo/
widget/
Author: jonesde
Date: Tue Mar 18 12:13:58 2008
New Revision: 638513
URL: http://svn.apache.org/viewvc?rev=638513&view=rev
Log:
Initial browser wandering UI in place along with various cleanups, etc
Added:
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh (with props)
ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/
ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl (with props)
ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml (with props)
Modified:
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java Tue Mar 18 12:13:58 2008
@@ -22,7 +22,7 @@
/**
*
*/
-public class ArtifactInfoBase {
+public abstract class ArtifactInfoBase {
protected ArtifactInfoFactory aif;
public ArtifactInfoBase(ArtifactInfoFactory aif) {
@@ -36,4 +36,9 @@
return false;
}
}
+
+ abstract public String getDisplayName();
+ abstract public String getDisplayType();
+ abstract public String getType();
+ abstract public String getUniqueId();
}
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java Tue Mar 18 12:13:58 2008
@@ -19,6 +19,7 @@
package org.ofbiz.webtools.artifactinfo;
import java.io.IOException;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import java.util.Map;
@@ -29,6 +30,7 @@
import javolution.util.FastMap;
import javolution.util.FastSet;
+import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.cache.UtilCache;
@@ -55,8 +57,18 @@
*/
public class ArtifactInfoFactory {
+ public static final String module = ArtifactInfoFactory.class.getName();
+
protected static UtilCache<String, ArtifactInfoFactory> artifactInfoFactoryCache = new UtilCache("ArtifactInfoFactory");
+ public static final String EntityInfoTypeId = "entity";
+ public static final String ServiceInfoTypeId = "service";
+ public static final String ServiceEcaInfoTypeId = "serviceEca";
+ public static final String FormWidgetInfoTypeId = "form";
+ public static final String ScreenWidgetInfoTypeId = "screen";
+ public static final String ControllerRequestInfoTypeId = "request";
+ public static final String ControllerViewInfoTypeId = "view";
+
protected String delegatorName;
protected ModelReader entityModelReader;
protected DispatchContext dispatchContext;
@@ -237,8 +249,44 @@
return curInfo;
}
+ public ArtifactInfoBase getArtifactInfoByUniqueIdAndType(String uniqueId, String type) {
+ if (uniqueId.contains("#")) {
+ int poundIndex = uniqueId.indexOf('#');
+ return getArtifactInfoByNameAndType(uniqueId.substring(poundIndex+1), uniqueId.substring(0, poundIndex), type);
+ } else {
+ return getArtifactInfoByNameAndType(uniqueId, null, type);
+ }
+ }
+
+ public ArtifactInfoBase getArtifactInfoByNameAndType(String artifactName, String artifactLocation, String type) {
+ try {
+ if ("entity".equals(type)) {
+ return this.getEntityArtifactInfo(artifactName);
+ } else if ("service".equals(type)) {
+ return this.getServiceArtifactInfo(artifactName);
+ } else if ("form".equals(type)) {
+ return this.getFormWidgetArtifactInfo(artifactName, artifactLocation);
+ } else if ("screen".equals(type)) {
+ return this.getScreenWidgetArtifactInfo(artifactName, artifactLocation);
+ } else if ("request".equals(type)) {
+ return this.getControllerRequestArtifactInfo(new URL(artifactLocation), artifactName);
+ } else if ("view".equals(type)) {
+ return this.getControllerViewArtifactInfo(new URL(artifactLocation), artifactName);
+ }
+ } catch (GeneralException e) {
+ Debug.logError(e, "Error getting artifact info: " + e.toString(), module);
+ } catch (MalformedURLException e) {
+ Debug.logError(e, "Error getting artifact info: " + e.toString(), module);
+ }
+ return null;
+ }
+
public Set<ArtifactInfoBase> getAllArtifactInfosByNamePartial(String artifactNamePartial) {
Set<ArtifactInfoBase> aiBaseSet = FastSet.newInstance();
+
+ if (UtilValidate.isEmpty(artifactNamePartial)) {
+ return aiBaseSet;
+ }
for (Map.Entry<String, EntityArtifactInfo> curEntry: allEntityInfos.entrySet()) {
if (curEntry.getKey().contains(artifactNamePartial)) {
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java Tue Mar 18 12:13:58 2008
@@ -92,6 +92,18 @@
return this.requestUri;
}
+ public String getDisplayName() {
+ return this.getUniqueId();
+ }
+
+ public String getDisplayType() {
+ return "Controller Request";
+ }
+
+ public String getType() {
+ return ArtifactInfoFactory.ControllerRequestInfoTypeId;
+ }
+
public String getUniqueId() {
return this.controllerXmlUrl.toExternalForm() + "#" + this.requestUri;
}
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java Tue Mar 18 12:13:58 2008
@@ -67,6 +67,18 @@
return this.viewUri;
}
+ public String getDisplayName() {
+ return this.getUniqueId();
+ }
+
+ public String getDisplayType() {
+ return "Controller View";
+ }
+
+ public String getType() {
+ return ArtifactInfoFactory.ControllerViewInfoTypeId;
+ }
+
public String getUniqueId() {
return this.controllerXmlUrl.toExternalForm() + "#" + this.viewUri;
}
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java Tue Mar 18 12:13:58 2008
@@ -18,14 +18,13 @@
*/
package org.ofbiz.webtools.artifactinfo;
-import java.util.List;
+import java.util.Set;
-import javolution.util.FastList;
+import javolution.util.FastSet;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.model.ModelEntity;
import org.ofbiz.entityext.eca.EntityEcaRule;
-import org.ofbiz.webtools.artifactinfo.ArtifactInfoFactory;
/**
*
@@ -42,6 +41,22 @@
return this.modelEntity;
}
+ public String getDisplayName() {
+ return this.getUniqueId();
+ }
+
+ public String getDisplayType() {
+ return "Entity";
+ }
+
+ public String getType() {
+ return ArtifactInfoFactory.EntityInfoTypeId;
+ }
+
+ public String getUniqueId() {
+ return this.modelEntity.getEntityName();
+ }
+
public boolean equals(Object obj) {
if (obj instanceof EntityArtifactInfo) {
return this.modelEntity.getEntityName().equals(((EntityArtifactInfo) obj).modelEntity.getEntityName());
@@ -50,47 +65,45 @@
}
}
- public List<EntityArtifactInfo> getEntitiesRelatedOne() {
- List<EntityArtifactInfo> entityList = FastList.newInstance();
+ public Set<EntityArtifactInfo> getEntitiesRelatedOne() {
+ Set<EntityArtifactInfo> entitySet = FastSet.newInstance();
// TODO: implement this
- return entityList;
+ return entitySet;
}
- public List<EntityArtifactInfo> getEntitiesRelatedMany() {
- List<EntityArtifactInfo> entityList = FastList.newInstance();
+ public Set<EntityArtifactInfo> getEntitiesRelatedMany() {
+ Set<EntityArtifactInfo> entitySet = FastSet.newInstance();
// TODO: implement this
- return entityList;
+ return entitySet;
}
/** Get the Services that use this Entity */
- public List<ServiceArtifactInfo> getServicesUsingEntity() {
- List<ServiceArtifactInfo> serviceList = FastList.newInstance();
- // TODO: implement this
- return serviceList;
+ public Set<ServiceArtifactInfo> getServicesUsingEntity() {
+ return this.aif.allServiceInfosReferringToEntityName.get(this.modelEntity.getEntityName());
}
/** Get the Services called by Entity ECA */
- public List<ServiceArtifactInfo> getServicesCalledByEntityEca() {
- List<ServiceArtifactInfo> serviceList = FastList.newInstance();
+ public Set<ServiceArtifactInfo> getServicesCalledByEntityEca() {
+ Set<ServiceArtifactInfo> serviceSet = FastSet.newInstance();
// TODO: implement this
- return serviceList;
+ return serviceSet;
}
- public List<EntityEcaRule> getEntityEcaRules() {
- List<EntityEcaRule> eecaList = FastList.newInstance();
+ public Set<EntityEcaRule> getEntityEcaRules() {
+ Set<EntityEcaRule> eecaSet = FastSet.newInstance();
// TODO: implement this
- return eecaList;
+ return eecaSet;
}
- public List<FormWidgetArtifactInfo> getFormsUsingEntity() {
- List<FormWidgetArtifactInfo> formList = FastList.newInstance();
+ public Set<FormWidgetArtifactInfo> getFormsUsingEntity() {
+ Set<FormWidgetArtifactInfo> formSet = FastSet.newInstance();
// TODO: implement this
- return formList;
+ return formSet;
}
- public List<ScreenWidgetArtifactInfo> getScreensUsingEntity() {
- List<ScreenWidgetArtifactInfo> screenList = FastList.newInstance();
+ public Set<ScreenWidgetArtifactInfo> getScreensUsingEntity() {
+ Set<ScreenWidgetArtifactInfo> screenSet = FastSet.newInstance();
// TODO: implement this
- return screenList;
+ return screenSet;
}
}
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java Tue Mar 18 12:13:58 2008
@@ -51,6 +51,18 @@
}
}
+ public String getDisplayName() {
+ return this.getUniqueId();
+ }
+
+ public String getDisplayType() {
+ return "Form Widget";
+ }
+
+ public String getType() {
+ return ArtifactInfoFactory.FormWidgetInfoTypeId;
+ }
+
public String getUniqueId() {
return this.formLocation + "#" + this.formName;
}
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java Tue Mar 18 12:13:58 2008
@@ -52,6 +52,18 @@
}
+ public String getDisplayName() {
+ return this.getUniqueId();
+ }
+
+ public String getDisplayType() {
+ return "Screen Widget";
+ }
+
+ public String getType() {
+ return ArtifactInfoFactory.ScreenWidgetInfoTypeId;
+ }
+
public String getUniqueId() {
return this.screenLocation + "#" + this.screenName;
}
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java Tue Mar 18 12:13:58 2008
@@ -226,8 +226,23 @@
this.displayPrefix = displayPrefix;
}
+ public String getDisplayName() {
+ return this.getDisplayPrefixedName();
+ }
public String getDisplayPrefixedName() {
return (this.displayPrefix != null ? this.displayPrefix : "") + this.modelService.name;
+ }
+
+ public String getDisplayType() {
+ return "Service";
+ }
+
+ public String getType() {
+ return ArtifactInfoFactory.ServiceInfoTypeId;
+ }
+
+ public String getUniqueId() {
+ return this.modelService.name;
}
public Set<EntityArtifactInfo> getEntitiesUsedByService() {
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java Tue Mar 18 12:13:58 2008
@@ -60,6 +60,22 @@
}
}
+ public String getDisplayName() {
+ return this.getDisplayPrefixedName();
+ }
+
+ public String getDisplayType() {
+ return "Service ECA";
+ }
+
+ public String getType() {
+ return ArtifactInfoFactory.ServiceEcaInfoTypeId;
+ }
+
+ public String getUniqueId() {
+ return this.serviceEcaRule.toString();
+ }
+
public ServiceEcaRule getServiceEcaRule() {
return this.serviceEcaRule;
}
Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh?rev=638513&view=auto
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh Tue Mar 18 12:13:58 2008
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.webtools.artifactinfo.*;
+import org.ofbiz.base.util.*;
+
+name = parameters.get("name");
+location = parameters.get("location");
+type = parameters.get("type");
+uniqueId = parameters.get("uniqueId");
+
+aif = ArtifactInfoFactory.getArtifactInfoFactory(delegator.getDelegatorName());
+context.put("aif", aif);
+
+if (UtilValidate.isNotEmpty(type)) {
+ if (UtilValidate.isNotEmpty(name)) {
+ context.put("artifactInfo", aif.getArtifactInfoByNameAndType(name, location, type));
+ } else if (UtilValidate.isNotEmpty(uniqueId)) {
+ context.put("artifactInfo", aif.getArtifactInfoByUniqueIdAndType(uniqueId, type));
+ }
+} else {
+ artifactInfoSet = aif.getAllArtifactInfosByNamePartial(name);
+ if (artifactInfoSet.size() == 1) {
+ context.put("artifactInfo", artifactInfoSet.iterator().next());
+ } else {
+ context.put("artifactInfoSet", artifactInfoSet);
+ }
+}
Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=638513&r1=638512&r2=638513&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Tue Mar 18 12:13:58 2008
@@ -447,10 +447,7 @@
</request-map>
<!-- EntitySync requests -->
- <request-map uri="EntitySyncStatus">
- <security https="true" auth="true"/>
- <response name="success" type="view" value="EntitySyncStatus"/>
- </request-map>
+ <request-map uri="EntitySyncStatus"><security https="true" auth="true"/><response name="success" type="view" value="EntitySyncStatus"/></request-map>
<request-map uri="resetEntitySyncStatusToNotStarted">
<security https="true" auth="true"/>
<event type="service" path="" invoke="resetEntitySyncStatusToNotStarted"/>
@@ -475,6 +472,9 @@
<response name="success" type="view" value="EntitySyncStatus"/>
<response name="error" type="view" value="EntitySyncStatus"/>
</request-map>
+
+ <!-- Artifact Info Requests -->
+ <request-map uri="ArtifactInfo"><security https="true" auth="true"/><response name="success" type="view" value="ArtifactInfo"/></request-map>
<!-- cert requests -->
<request-map uri="myCertificates">
@@ -606,5 +606,8 @@
<!-- cert views -->
<view-map name="viewbrowsercerts" type="screen" page="component://webtools/widget/CommonScreens.xml#browsercerts"/>
+
+ <!-- Artifact Info Views -->
+ <view-map name="ArtifactInfo" type="screen" page="component://webtools/widget/ArtifactInfoScreens.xml#ArtifactInfo"/>
<!-- end of view mappings -->
</site-conf>
Added: ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl?rev=638513&view=auto
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl Tue Mar 18 12:13:58 2008
@@ -0,0 +1,152 @@
+<#--
+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.
+-->
+
+
+<#if artifactInfo?exists>
+ <h1>Artifact Info (${artifactInfo.getDisplayType()}): ${artifactInfo.getDisplayName()}</h1>
+
+ <#if artifactInfo.getType() == "entity">
+ <h2>Services Using This Entity</h2>
+ <#list artifactInfo.getServicesUsingEntity()?if_exists as serviceArtifactInfo>
+ <@displayServiceArtifactInfo serviceArtifactInfo=serviceArtifactInfo/>
+ </#list>
+
+ <#elseif artifactInfo.getType() == "service"/>
+ <h2>Entities Used By This Service</h2>
+ <#list artifactInfo.getEntitiesUsedByService()?if_exists as entityArtifactInfo>
+ <@displayEntityArtifactInfo entityArtifactInfo=entityArtifactInfo/>
+ </#list>
+
+ <h2>Services Calling This Service</h2>
+ <#list artifactInfo.getServicesCallingService()?if_exists as serviceArtifactInfo>
+ <@displayServiceArtifactInfo serviceArtifactInfo=serviceArtifactInfo/>
+ </#list>
+
+ <h2>Services Called By This Service</h2>
+ <#list artifactInfo.getServicesCalledByService()?if_exists as serviceArtifactInfo>
+ <@displayServiceArtifactInfo serviceArtifactInfo=serviceArtifactInfo/>
+ </#list>
+
+ <h2>Service ECA Rules Triggered By This Service</h2>
+ <#list artifactInfo.getServiceEcaRulesTriggeredByService()?if_exists as serviceEcaArtifactInfo>
+ <@displayServiceEcaArtifactInfo serviceEcaArtifactInfo=serviceEcaArtifactInfo/>
+ </#list>
+
+ <h2>Service ECA Rules Calling This Service</h2>
+ <#list artifactInfo.getServiceEcaRulesCallingService()?if_exists as serviceEcaArtifactInfo>
+ <@displayServiceEcaArtifactInfo serviceEcaArtifactInfo=serviceEcaArtifactInfo/>
+ </#list>
+
+ <h2>Forms Calling This Service</h2>
+ <#list artifactInfo.getFormsCallingService()?if_exists as formWidgetArtifactInfo>
+ <@displayFormWidgetArtifactInfo formWidgetArtifactInfo=formWidgetArtifactInfo/>
+ </#list>
+
+ <h2>Forms Based On This Service</h2>
+ <#list artifactInfo.getFormsBasedOnService()?if_exists as formWidgetArtifactInfo>
+ <@displayFormWidgetArtifactInfo formWidgetArtifactInfo=formWidgetArtifactInfo/>
+ </#list>
+
+ <h2>Screens Calling This Service</h2>
+ <#list artifactInfo.getScreensCallingService()?if_exists as screenWidgetArtifactInfo>
+ <@displayScreenWidgetArtifactInfo screenWidgetArtifactInfo=screenWidgetArtifactInfo/>
+ </#list>
+ <#elseif artifactInfo.getType() == "form"/>
+
+ <#elseif artifactInfo.getType() == "screen"/>
+
+ <#elseif artifactInfo.getType() == "request"/>
+
+ <#elseif artifactInfo.getType() == "view"/>
+
+ </#if>
+
+<#else/>
+
+ <#-- add form here to specify artifact info name. -->
+ <div class="screenlet-body">
+ <form name="ArtifactInfoByName" method="post" action="<@o...@ofbizUrl>" class="basic-form">
+ Artifact Name: <input type="text" name="name" value="${parameters.name?if_exists}" size="60"/>
+ <select name="type">
+ <option value="">Any Type</option>
+ <option>entity</option>
+ <option>service</option>
+ <option>form</option>
+ <option>screen</option>
+ <option>request</option>
+ <option>view</option>
+ </select>
+ <input type="submit" name="submitButton" value="Lookup"/>
+ </form>
+ </div>
+
+ <#-- add set of ArtifactInfo if there is not a single one identified, with link to each -->
+ <#if artifactInfoSet?has_content>
+ <div class="screenlet-body">
+ <h4>Multiple Artifacts Found:</h4>
+ <#list artifactInfoSet as curArtifactInfo>
+ <div>${curArtifactInfo.getDisplayType()}: <@displayArtifactInfoLink artifactInfo=curArtifactInfo/></div>
+ </#list>
+ </div>
+ </#if>
+</#if>
+
+<#macro displayEntityArtifactInfo entityArtifactInfo>
+ <div> - <@displayArtifactInfoLink artifactInfo=entityArtifactInfo/></div>
+</#macro>
+
+<#macro displayServiceArtifactInfo serviceArtifactInfo>
+ <div> - <@displayArtifactInfoLink artifactInfo=serviceArtifactInfo/></div>
+</#macro>
+
+<#macro displayServiceEcaArtifactInfo serviceEcaArtifactInfo>
+ <h4>Service ECA Rule: ${serviceEcaArtifactInfo.getDisplayName()}</h4>
+ <#if serviceEcaArtifactInfo.getServicesCalledByServiceEcaActions()?has_content>
+ <h4>Services Called By Service ECA Actions</h4>
+ <#list serviceEcaArtifactInfo.getServicesCalledByServiceEcaActions() as serviceArtifactInfo>
+ <@displayServiceArtifactInfo serviceArtifactInfo=serviceArtifactInfo/>
+ </#list>
+ </#if>
+ <#if serviceEcaArtifactInfo.getServicesTriggeringServiceEca()?has_content>
+ <h4>Services Triggering Service ECA</h4>
+ <#list serviceEcaArtifactInfo.getServicesTriggeringServiceEca() as serviceArtifactInfo>
+ <@displayServiceArtifactInfo serviceArtifactInfo=serviceArtifactInfo/>
+ </#list>
+ </#if>
+</#macro>
+
+<#macro displayFormWidgetArtifactInfo formWidgetArtifactInfo>
+ <div> - <@displayArtifactInfoLink artifactInfo=formWidgetArtifactInfo/></div>
+</#macro>
+
+<#macro displayScreenWidgetArtifactInfo screenWidgetArtifactInfo>
+ <div> - <@displayArtifactInfoLink artifactInfo=screenWidgetArtifactInfo/></div>
+</#macro>
+
+<#macro displayControllerRequestArtifactInfo controllerRequestArtifactInfo>
+ <div> - <@displayArtifactInfoLink artifactInfo=controllerRequestArtifactInfo/></div>
+</#macro>
+
+<#macro displayControllerViewArtifactInfo controllerViewArtifactInfo>
+ <div> - <@displayArtifactInfoLink artifactInfo=controllerViewArtifactInfo/></div>
+</#macro>
+
+<#macro displayArtifactInfoLink artifactInfo>
+<a href="<@o...@ofbizUrl>">${artifactInfo.getDisplayName()}</a>
+</#macro>
Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml?rev=638513&view=auto
==============================================================================
--- ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml (added)
+++ ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml Tue Mar 18 12:13:58 2008
@@ -0,0 +1,39 @@
+<?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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+ <screen name="ArtifactInfo">
+ <section>
+ <actions>
+ <set field="titleProperty" value="WebtoolsServiceReference"/>
+ <set field="appButtonItem" value="service"/>
+ <script location="component://webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.bsh"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <platform-specific><html><html-template location="component://webtools/webapp/webtools/artifactinfo/ArtifactInfo.ftl"/></html></platform-specific>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+</screens>
Propchange: ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/webtools/widget/ArtifactInfoScreens.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml