You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/10/28 09:56:04 UTC
svn commit: r1634818 [4/4] - in
/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23: ./
applications/accounting/script/org/ofbiz/accounting/test/
applications/accounting/src/org/ofbiz/accounting/payment/
applications/accounting/src/org/ofbiz/acco...
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java Tue Oct 28 08:56:02 2014
@@ -21,7 +21,6 @@ package org.ofbiz.humanres;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
-import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -33,16 +32,13 @@ import javolution.util.FastMap;
import net.sf.json.JSONObject;
import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.UtilDateTime;
-import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
-import org.ofbiz.entity.condition.EntityExpr;
import org.ofbiz.entity.condition.EntityOperator;
-import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityQuery;
public class HumanResEvents {
public static final String module = HumanResEvents.class.getName();
@@ -62,20 +58,21 @@ public class HumanResEvents {
List<GenericValue> childOfComs;
//check employee position
try {
- List<GenericValue> isEmpl = delegator.findByAnd("EmplPosition", UtilMisc.toMap(
- "emplPositionId", partyId), null, false);
- if (UtilValidate.isNotEmpty(isEmpl)) {
+ long emplPosCount = EntityQuery.use(delegator).from("EmplPosition")
+ .where("emplPositionId", partyId).queryCount();
+ if (emplPosCount > 0) {
String emplId = partyId;
- List<GenericValue> emlpfillCtxs = EntityUtil.filterByDate(delegator.findByAnd("EmplPositionFulfillment", UtilMisc.toMap(
- "emplPositionId", emplId), null, false));
+ List<GenericValue> emlpfillCtxs = EntityQuery.use(delegator).from("EmplPositionFulfillment")
+ .where("emplPositionId", emplId)
+ .filterByDate().queryList();
if (UtilValidate.isNotEmpty(emlpfillCtxs)) {
for (GenericValue emlpfillCtx : emlpfillCtxs ) {
String memberId = emlpfillCtx.getString("partyId");
- GenericValue memCtx = delegator.findOne("Person" ,UtilMisc.toMap("partyId", memberId), false);
+ GenericValue memCtx = EntityQuery.use(delegator).from("Person").where("partyId", partyId).queryOne();
String title = null;
- if (UtilValidate.isNotEmpty(memCtx)) {
- String firstname = (String) memCtx.get("firstName");
- String lastname = (String) memCtx.get("lastName");
+ if (memCtx != null) {
+ String firstname = memCtx.getString("firstName");
+ String lastname = memCtx.getString("lastName");
if (UtilValidate.isEmpty(lastname)) {
lastname = "";
}
@@ -84,8 +81,8 @@ public class HumanResEvents {
}
title = firstname +" "+ lastname;
}
- GenericValue memGroupCtx = delegator.findOne("PartyGroup" ,UtilMisc.toMap("partyId", memberId), false);
- if (UtilValidate.isNotEmpty(memGroupCtx)) {
+ GenericValue memGroupCtx = EntityQuery.use(delegator).from("PartyGroup").where("partyId", partyId).queryOne();
+ if (memGroupCtx != null) {
title = memGroupCtx.getString("groupName");
}
@@ -118,10 +115,12 @@ public class HumanResEvents {
}
try {
- GenericValue partyGroup = delegator.findOne("PartyGroup" ,UtilMisc.toMap("partyId", partyId), false);
+ GenericValue partyGroup = EntityQuery.use(delegator).from("PartyGroup").where("partyId", partyId).queryOne();
if (UtilValidate.isNotEmpty(partyGroup)) {
- childOfComs = EntityUtil.filterByDate(delegator.findByAnd("PartyRelationship", UtilMisc.toMap(
- "partyIdFrom", partyGroup.get("partyId"), "partyRelationshipTypeId", "GROUP_ROLLUP"), null, false));
+ childOfComs = EntityQuery.use(delegator).from("PartyRelationship")
+ .where("partyIdFrom", partyGroup.get("partyId"),
+ "partyRelationshipTypeId", "GROUP_ROLLUP")
+ .filterByDate().queryList();
if (UtilValidate.isNotEmpty(childOfComs)) {
for (GenericValue childOfCom : childOfComs ) {
@@ -137,7 +136,7 @@ public class HumanResEvents {
catId = childOfCom.get("partyIdTo");
//Department or Sub department
- GenericValue childContext = delegator.findOne("PartyGroup" ,UtilMisc.toMap("partyId", catId), false);
+ GenericValue childContext = EntityQuery.use(delegator).from("PartyGroup").where("partyId", catId).queryOne();
if (UtilValidate.isNotEmpty(childContext)) {
catNameField = (String) childContext.get("groupName");
title = catNameField;
@@ -145,17 +144,18 @@ public class HumanResEvents {
}
//Check child existing
- List<GenericValue> childOfSubComs = EntityUtil.filterByDate(delegator.findByAnd("PartyRelationship", UtilMisc.toMap(
- "partyIdFrom", catId, "partyRelationshipTypeId", "GROUP_ROLLUP"), null, false));
+ List<GenericValue> childOfSubComs = EntityQuery.use(delegator).from("PartyRelationship")
+ .where("partyIdFrom", catId,
+ "partyRelationshipTypeId", "GROUP_ROLLUP")
+ .filterByDate().queryList();
//check employee position
- List<GenericValue> isPosition = delegator.findByAnd("EmplPosition", UtilMisc.toMap(
- "partyId", catId), null, false);
+ List<GenericValue> isPosition = EntityQuery.use(delegator).from("EmplPosition").where("partyId", catId).queryList();
if (UtilValidate.isNotEmpty(childOfSubComs) || UtilValidate.isNotEmpty(isPosition)) {
josonMap.put("state", "closed");
}
//Employee
- GenericValue emContext = delegator.findOne("Person" ,UtilMisc.toMap("partyId", catId), false);
+ GenericValue emContext = EntityQuery.use(delegator).from("Person").where("partyId", catId).queryOne();
if (UtilValidate.isNotEmpty(emContext)) {
String firstname = (String) emContext.get("firstName");
String lastname = (String) emContext.get("lastName");
@@ -188,19 +188,18 @@ public class HumanResEvents {
}
}
-
- List<EntityExpr> exprs = new ArrayList<EntityExpr>();
- exprs.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
- exprs.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "EMPL_POS_INACTIVE"));
-
+
List<GenericValue> isEmpls = null;
try {
- isEmpls = delegator.findList("EmplPosition", EntityCondition.makeCondition(exprs, EntityOperator.AND), null, null, null, false);
+ isEmpls = EntityQuery.use(delegator).from("EmplPosition")
+ .where(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId),
+ EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "EMPL_POS_INACTIVE"))
+ .filterByDate("actualFromDate", "actualThruDate")
+ .queryList();
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
-
- isEmpls = EntityUtil.filterByDate(isEmpls, UtilDateTime.nowTimestamp(), "actualFromDate", "actualThruDate", true);
+
if (UtilValidate.isNotEmpty(isEmpls)) {
for (GenericValue childOfEmpl : isEmpls ) {
Map emplMap = FastMap.newInstance();
@@ -211,13 +210,14 @@ public class HumanResEvents {
String emplId = (String) childOfEmpl.get("emplPositionId");
String typeId = (String) childOfEmpl.get("emplPositionTypeId");
//check child
- List<GenericValue> emlpfCtxs = EntityUtil.filterByDate(delegator.findByAnd("EmplPositionFulfillment", UtilMisc.toMap(
- "emplPositionId", emplId), null, false));
+ List<GenericValue> emlpfCtxs = EntityQuery.use(delegator).from("EmplPositionFulfillment")
+ .where("emplPositionId", emplId)
+ .filterByDate().queryList();
if (UtilValidate.isNotEmpty(emlpfCtxs)) {
emplMap.put("state", "closed");
}
- GenericValue emplContext = delegator.findOne("EmplPositionType" ,UtilMisc.toMap("emplPositionTypeId", typeId), false);
+ GenericValue emplContext = EntityQuery.use(delegator).from("EmplPositionType").where("emplPositionTypeId", typeId).queryOne();
String title = null;
if (UtilValidate.isNotEmpty(emplContext)) {
title = (String) emplContext.get("description") + " " +"["+ emplId +"]";
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Tue Oct 28 08:56:02 2014
@@ -41,7 +41,6 @@ import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilNumber;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.base.util.collections.ResourceBundleMapWrapper;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java Tue Oct 28 08:56:02 2014
@@ -23,7 +23,6 @@ import javax.servlet.http.HttpSessionEve
import javax.servlet.http.HttpSessionListener;
import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.DelegatorFactory;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Tue Oct 28 08:56:02 2014
@@ -54,7 +54,6 @@ import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
import org.ofbiz.entity.condition.EntityOperator;
import org.ofbiz.entity.util.EntityUtil;
-import org.ofbiz.order.shoppingcart.ShoppingCart.ProductPromoUseInfo;
import org.ofbiz.order.shoppingcart.product.ProductPromoWorker;
import org.ofbiz.product.catalog.CatalogWorker;
import org.ofbiz.product.config.ProductConfigWorker;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java Tue Oct 28 08:56:02 2014
@@ -21,9 +21,7 @@ package org.ofbiz.product.category;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
-import java.math.BigDecimal;
import java.sql.Timestamp;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -50,12 +48,10 @@ import org.ofbiz.entity.condition.Entity
import org.ofbiz.entity.model.ModelEntity;
import org.ofbiz.entity.util.EntityFindOptions;
import org.ofbiz.entity.util.EntityListIterator;
-import org.ofbiz.entity.util.EntityTypeUtil;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.product.catalog.CatalogWorker;
import org.ofbiz.product.product.ProductWorker;
import org.ofbiz.service.DispatchContext;
-import org.ofbiz.service.GenericServiceException;
import org.ofbiz.service.LocalDispatcher;
import org.ofbiz.service.ServiceUtil;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Tue Oct 28 08:56:02 2014
@@ -35,7 +35,6 @@ import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilNumber;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.base.util.collections.ResourceBundleMapWrapper;
import org.ofbiz.common.geo.GeoWorker;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/log4j2.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/log4j2.xml?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/log4j2.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/log4j2.xml Tue Oct 28 08:56:02 2014
@@ -1,46 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration monitorInterval="60">
+ <!--
+ Default configuration for logging; for customizations refer to http://logging.apache.org/log4j/2.x/manual/configuration.html.
+ With this configuration the following behavior is defined:
+ * all log messages of severity "warning" or greater, generated by external jars, are logged in the ofbiz.log file and in the console
+ * all log messages of any severity, generated by OFBiz, are logged in the ofbiz.log file and in the console
+ * all log messages of severity "error" or greater are also logged in the error.log file
+ When the ofbiz.log file reaches 1MB in size a new file is created and a date/sequence suffix is added; up to 10 files are kept.
+ When the error.log file reaches 1MB in size a new file is created and a date/sequence suffix is added; up to 3 files are kept.
+ The settings in this configuration file can be changed without restarting the instance: every 60 seconds the file is checked for modifications.
+ -->
<Appenders>
<Console name="stdout" target="SYSTEM_OUT">
- <PatternLayout pattern="%date{COMPACT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/>
+ <PatternLayout pattern="%date{DEFAULT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/>
</Console>
<RollingFile name="ofbiz" fileName="runtime/logs/ofbiz.log"
- filePattern="runtime/logs/ofbiz-%d{yyyy-MM-dd}-%i.log.zip">
- <PatternLayout pattern="%date{COMPACT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/>
+ filePattern="runtime/logs/ofbiz-%d{yyyy-MM-dd}-%i.log">
+ <PatternLayout pattern="%date{DEFAULT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="1 MB"/>
</Policies>
- <DefaultRolloverStrategy max="4"/>
+ <DefaultRolloverStrategy max="10"/>
</RollingFile>
- <RollingFile name="external" fileName="runtime/logs/external.log"
- filePattern="runtime/logs/external-%d{yyyy-MM-dd}-%i.log.zip">
- <PatternLayout pattern="%date{COMPACT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/>
+ <RollingFile name="error" fileName="runtime/logs/error.log"
+ filePattern="runtime/logs/error-%d{yyyy-MM-dd}-%i.log">
+ <ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
+ <PatternLayout pattern="%date{DEFAULT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="1 MB"/>
</Policies>
- <DefaultRolloverStrategy max="4"/>
+ <DefaultRolloverStrategy max="3"/>
</RollingFile>
<Async name="async">
<AppenderRef ref="ofbiz"/>
<AppenderRef ref="stdout"/>
+ <AppenderRef ref="error"/>
</Async>
</Appenders>
<Loggers>
<logger name="org.ofbiz.base.converter.Converters" level="warn"/>
- <logger name="org.apache" level="warn" additivity="false">
- <appender-ref ref="external"/>
- </logger>
- <logger name="org.apache.tomcat" level="info" additivity="false">
- <appender-ref ref="external"/>
- </logger>
- <logger name="org.apache.catalina" level="info" additivity="false">
- <appender-ref ref="external"/>
- </logger>
- <logger name="freemarker" level="warn" additivity="false">
- <appender-ref ref="external"/>
- </logger>
+ <logger name="org.apache" level="warn"/>
+ <logger name="freemarker" level="warn"/>
<Root level="all">
<AppenderRef ref="async"/>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/ofbiz-component.xml?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/ofbiz-component.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/ofbiz-component.xml Tue Oct 28 08:56:02 2014
@@ -22,9 +22,14 @@ under the License.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<resource-loader name="main" type="component"/>
+ <classpath type="dir" location="dtd"/>
<classpath type="jar" location="build/lib/*"/>
<classpath type="dir" location="config"/>
<classpath type="jar" location="lib/*"/>
+ <classpath type="jar" location="lib/ant/*"/>
+ <classpath type="jar" location="lib/commons/*"/>
+ <classpath type="jar" location="lib/j2eespecs/*"/>
+ <classpath type="jar" location="lib/scripting/*"/>
<test-suite loader="main" location="testdef/basetests.xml"/>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ComponentContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ComponentContainer.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ComponentContainer.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ComponentContainer.java Tue Oct 28 08:56:02 2014
@@ -29,7 +29,6 @@ import org.ofbiz.base.component.AlreadyL
import org.ofbiz.base.component.ComponentConfig;
import org.ofbiz.base.component.ComponentException;
import org.ofbiz.base.component.ComponentLoaderConfig;
-import org.ofbiz.base.start.Classpath;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.FileUtil;
import org.ofbiz.base.util.UtilValidate;
@@ -46,14 +45,9 @@ public class ComponentContainer implemen
public static final String module = ComponentContainer.class.getName();
- //protected static List loadedComponents2 = null;
- protected Classpath classPath = new Classpath();
- protected Classpath libraryPath = new Classpath(System.getProperty("java.library.path"));
protected String configFileLocation = null;
private String name;
private boolean loaded = false;
- private String instrumenterClassName;
- private String instrumenterFile;
@Override
public void init(String[] args, String name, String configFile) throws ContainerException {
@@ -69,25 +63,9 @@ public class ComponentContainer implemen
loaderConfig = cc.getProperty("loader-config").value;
}
- // check for en override update classpath
- boolean updateClassPath = true;
- if (cc.getProperty("update-classpath") != null) {
- updateClassPath = "true".equalsIgnoreCase(cc.getProperty("update-classpath").value);
- }
- if (cc.getProperty("ofbiz.instrumenterClassName") != null) {
- instrumenterClassName = cc.getProperty("ofbiz.instrumenterClassName").value;
- } else {
- instrumenterClassName = null;
- }
- if (cc.getProperty("ofbiz.instrumenterFile") != null) {
- instrumenterFile = cc.getProperty("ofbiz.instrumenterFile").value;
- } else {
- instrumenterFile = null;
- }
-
// load the components
try {
- loadComponents(loaderConfig, updateClassPath, instrumenterClassName, instrumenterFile);
+ loadComponents(loaderConfig);
} catch (AlreadyLoadedException e) {
throw new ContainerException(e);
} catch (ComponentException e) {
@@ -102,10 +80,8 @@ public class ComponentContainer implemen
return true;
}
- public synchronized void loadComponents(String loaderConfig, boolean updateClasspath, String instrumenterClassName, String instrumenterFile) throws AlreadyLoadedException, ComponentException {
+ public synchronized void loadComponents(String loaderConfig) throws AlreadyLoadedException, ComponentException {
// set the loaded list; and fail if already loaded
- //if (loadedComponents == null) {
- // loadedComponents = new LinkedList();
if (!loaded) {
loaded = true;
} else {
@@ -129,18 +105,6 @@ public class ComponentContainer implemen
this.loadComponentFromConfig(parentPath, def);
}
}
-
- // set the new classloader/classpath on the current thread
- if (updateClasspath) {
- if (UtilValidate.isNotEmpty(instrumenterFile) && UtilValidate.isNotEmpty(instrumenterClassName)) {
- classPath.instrument(instrumenterFile, instrumenterClassName);
- }
-
- System.setProperty("java.library.path", libraryPath.toString());
- ClassLoader cl = classPath.getClassLoader();
- Thread.currentThread().setContextClassLoader(cl);
- }
-
Debug.logInfo("All components loaded", module);
}
@@ -229,67 +193,10 @@ public class ComponentContainer implemen
private void loadComponent(ComponentConfig config) {
// make sure the component is enabled
if (!config.enabled()) {
- Debug.logInfo("Not Loading component : [" + config.getComponentName() + "] (disabled)", module);
+ Debug.logInfo("Not Loaded component : [" + config.getComponentName() + "] (disabled)", module);
return;
}
-
- Debug.logInfo("Loading component : [" + config.getComponentName() + "]", module);
- boolean isBaseComponent = "base".equals(config.getComponentName());
- List<ComponentConfig.ClasspathInfo> classpathInfos = config.getClasspathInfos();
- String configRoot = config.getRootLocation();
- configRoot = configRoot.replace('\\', '/');
- // set the root to have a trailing slash
- if (!configRoot.endsWith("/")) {
- configRoot = configRoot + "/";
- }
- if (classpathInfos != null) {
- String nativeLibExt = System.mapLibraryName("someLib").replace("someLib", "").toLowerCase();
- for (ComponentConfig.ClasspathInfo cp: classpathInfos) {
- String location = cp.location.replace('\\', '/');
- // set the location to not have a leading slash
- if (location.startsWith("/")) {
- location = location.substring(1);
- }
- if (!"jar".equals(cp.type) && !"dir".equals(cp.type)) {
- Debug.logError("Classpath type '" + cp.type + "' is not supported; '" + location + "' not loaded", module);
- continue;
- }
- String dirLoc = location;
- if (dirLoc.endsWith("/*")) {
- // strip off the slash splat
- dirLoc = location.substring(0, location.length() - 2);
- }
- File path = FileUtil.getFile(configRoot + dirLoc);
- if (path.exists()) {
- if (path.isDirectory()) {
- if ("dir".equals(cp.type)) {
- if (!isBaseComponent)
- classPath.addComponent(configRoot + location);
- }
- // load all .jar, .zip files and native libs in this directory
- boolean containsNativeLibs = false;
- for (File file: path.listFiles()) {
- String fileName = file.getName().toLowerCase();
- if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) {
- if (!isBaseComponent)
- classPath.addComponent(file);
- } else if (fileName.endsWith(nativeLibExt)) {
- containsNativeLibs = true;
- }
- }
- if (containsNativeLibs) {
- libraryPath.addComponent(path);
- }
- } else {
- // add a single file
- if (!isBaseComponent)
- classPath.addComponent(configRoot + location);
- }
- } else {
- Debug.logWarning("Location '" + configRoot + dirLoc + "' does not exist", module);
- }
- }
- }
+ Debug.logInfo("Loaded component : [" + config.getComponentName() + "]", module);
}
/**
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java Tue Oct 28 08:56:02 2014
@@ -36,7 +36,7 @@ public class JustLoadComponentsContainer
this.name = name;
try {
ComponentContainer cc = new ComponentContainer();
- cc.loadComponents(null, true, null, null);
+ cc.loadComponents(null);
} catch (AlreadyLoadedException e) {
Debug.logError(e, module);
} catch (ComponentException e) {
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java Tue Oct 28 08:56:02 2014
@@ -53,7 +53,6 @@ import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.GenericEntityConfException;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.model.ModelEntity;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml Tue Oct 28 08:56:02 2014
@@ -154,7 +154,7 @@ under the License.
<response name="success" type="view-last"/>
</request-map>
- <!-- Common json reponse events, chain these after events to send json reponses -->
+ <!-- Common json response events, chain these after events to send json responses -->
<!-- Standard json response, For security reason (OFBIZ-5409) tries to keep only the initially called service attributes -->
<request-map uri="json">
<security direct-request="false"/>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java Tue Oct 28 08:56:02 2014
@@ -18,8 +18,6 @@
*******************************************************************************/
package org.ofbiz.entity.condition;
-import static org.ofbiz.base.util.UtilGenerics.cast;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java Tue Oct 28 08:56:02 2014
@@ -19,7 +19,6 @@
package org.ofbiz.entity.condition;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java Tue Oct 28 08:56:02 2014
@@ -18,8 +18,6 @@
*******************************************************************************/
package org.ofbiz.entity.condition;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java Tue Oct 28 08:56:02 2014
@@ -27,7 +27,6 @@ import org.ofbiz.base.util.ObjectType;
import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.DelegatorFactory;
-import org.ofbiz.entity.EntityCryptoException;
import org.ofbiz.entity.GenericEntity;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericModelException;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelper.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelper.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelper.java Tue Oct 28 08:56:02 2014
@@ -24,8 +24,6 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelperDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelperDAO.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelperDAO.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelperDAO.java Tue Oct 28 08:56:02 2014
@@ -23,8 +23,6 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.Delegator;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Tue Oct 28 08:56:02 2014
@@ -42,7 +42,6 @@ import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
import org.ofbiz.base.concurrent.ExecutionPool;
import org.ofbiz.base.util.Debug;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java Tue Oct 28 08:56:02 2014
@@ -21,6 +21,7 @@ package org.ofbiz.entity.util;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -332,6 +333,16 @@ public class EntityQuery {
return this;
}
+ /** Specifies whether the query should return only values that are active during the specified moment using from/thruDate fields.
+ *
+ * @param moment - Date representing the moment in time that the values should be active during
+ * @return this EntityQuery object, to enable chaining
+ */
+ public EntityQuery filterByDate(Date moment) {
+ this.filterByDate(new java.sql.Timestamp(moment.getTime()));
+ return this;
+ }
+
/** Specifies whether the query should return only values that are currently active using the specified from/thru field name pairs.
*
* @param fromThruFieldName - String pairs representing the from/thru date field names e.g. "fromDate", "thruDate", "contactFromDate", "contactThruDate"
@@ -446,7 +457,11 @@ public class EntityQuery {
private EntityCondition makeWhereCondition(boolean usingCache) {
// we don't use the useCache field here because not all queries will actually use the cache, e.g. findCountByCondition never uses the cache
if (filterByDate && !usingCache) {
+ if (whereEntityCondition != null) {
return EntityCondition.makeCondition(whereEntityCondition, this.makeDateCondition());
+ } else {
+ return this.makeDateCondition();
+ }
}
return whereEntityCondition;
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java Tue Oct 28 08:56:02 2014
@@ -25,18 +25,15 @@ import java.util.List;
import org.ofbiz.base.location.FlexibleLocation;
import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.collections.FlexibleMapAccessor;
import org.ofbiz.base.util.string.FlexibleStringExpander;
import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.DelegatorFactory;
import org.ofbiz.entity.util.EntityDataAssert;
import org.ofbiz.entity.util.EntitySaxReader;
import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.MiniLangValidate;
import org.ofbiz.minilang.SimpleMethod;
import org.ofbiz.minilang.method.MethodContext;
-import org.ofbiz.minilang.method.MethodOperation;
import org.w3c.dom.Element;
/**
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/security/src/org/ofbiz/security/SecurityFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/security/src/org/ofbiz/security/SecurityFactory.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/security/src/org/ofbiz/security/SecurityFactory.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/security/src/org/ofbiz/security/SecurityFactory.java Tue Oct 28 08:56:02 2014
@@ -30,7 +30,6 @@ import javax.servlet.http.HttpSession;
import org.ofbiz.base.util.Assert;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.cache.UtilCache;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/job/JobManager.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/job/JobManager.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/job/JobManager.java Tue Oct 28 08:56:02 2014
@@ -43,7 +43,6 @@ import org.ofbiz.entity.condition.Entity
import org.ofbiz.entity.condition.EntityOperator;
import org.ofbiz.entity.serialize.SerializeException;
import org.ofbiz.entity.serialize.XmlSerializer;
-import org.ofbiz.entity.transaction.GenericTransactionException;
import org.ofbiz.entity.transaction.TransactionUtil;
import org.ofbiz.entity.util.EntityListIterator;
import org.ofbiz.service.DispatchContext;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java Tue Oct 28 08:56:02 2014
@@ -18,7 +18,18 @@
*******************************************************************************/
package org.ofbiz.base.start;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
+import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -39,10 +50,6 @@ public class Config {
public final String adminKey;
public final int adminPort;
public final String awtHeadless;
- public final String baseConfig;
- public final String baseDtd;
- public final String baseJar;
- public final String baseLib;
public final String containerConfig;
public final String instrumenterClassName;
public final String instrumenterFile;
@@ -84,18 +91,6 @@ public class Config {
System.setProperty("ofbiz.home", ofbizHome);
System.out.println("Set OFBIZ_HOME to - " + ofbizHome);
- // base config directory
- baseConfig = getOfbizHomeProp(props, "ofbiz.base.config", "framework/base/config");
-
- // base schema directory
- baseDtd = getOfbizHomeProp(props, "ofbiz.base.schema", "framework/base/dtd");
-
- // base lib directory
- baseLib = getOfbizHomeProp(props, "ofbiz.base.lib", "framework/base/lib");
-
- // base jar file
- baseJar = getOfbizHomeProp(props, "ofbiz.base.jar", "framework/base/build/lib/ofbiz-base.jar");
-
// log directory
logDir = getOfbizHomeProp(props, "ofbiz.log.dir", "runtime/logs");
@@ -291,47 +286,118 @@ public class Config {
return props;
}
- void initClasspath(Classpath classPath) throws IOException {
+ void initClasspath(Classpath classPath, Classpath libraryPath) throws Exception {
// add OFBIZ_HOME to class path
classPath.addClasspath(this.ofbizHome);
-
- // load all the resources from the framework base component
- // load all the jars from the base lib directory
- if (this.baseLib != null) {
- loadLibs(classPath, this.baseLib, true);
- }
- // load the ofbiz-base.jar and the ofbiz-base-test.jar
- if (this.baseJar != null) {
- classPath.addComponent(this.baseJar);
- classPath.addComponent(this.baseJar.substring(0, this.baseJar.indexOf(".jar")) + "-test.jar");
- }
- // load the base schema directory
- if (this.baseDtd != null) {
- classPath.addComponent(this.baseDtd);
- }
- // load the config directory
- if (this.baseConfig != null) {
- classPath.addComponent(this.baseConfig);
- }
+ File home = new File(this.ofbizHome);
+ collectClasspathEntries(new File(home, "framework"), classPath, libraryPath);
+ collectClasspathEntries(new File(home, "applications"), classPath, libraryPath);
+ collectClasspathEntries(new File(home, "specialpurpose"), classPath, libraryPath);
+ collectClasspathEntries(new File(home, "hot-deploy"), classPath, libraryPath);
+ System.setProperty("java.library.path", libraryPath.toString());
classPath.instrument(this.instrumenterFile, this.instrumenterClassName);
}
- private void loadLibs(Classpath classPath, String path, boolean recurse) throws IOException {
- File libDir = new File(path);
- if (libDir.exists()) {
- File files[] = libDir.listFiles();
- for (File file: files) {
- String fileName = file.getName();
- if (file.isHidden()) {
+ private void collectClasspathEntries(File folder, Classpath classpath, Classpath libraryPath) throws ParserConfigurationException, IOException, SAXException {
+ if (!folder.exists() && !folder.isDirectory()) {
+ return;
+ }
+ FileFilter componentLoadFilter = new FileFilter() {
+ public boolean accept(File pathname) {
+ return "component-load.xml".equals(pathname.getName());
+ }
+ };
+ FileFilter folderFilter = new FileFilter() {
+ public boolean accept(File pathname) {
+ return pathname.isDirectory();
+ }
+ };
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ File[] componentLoadFiles;
+ List<File> ofbizComponents = new ArrayList<File>();
+ componentLoadFiles = folder.listFiles(componentLoadFilter);
+ if (componentLoadFiles != null && componentLoadFiles.length == 1) {
+ File componentLoadFile = componentLoadFiles[0];
+ // parse and get folder names to be processed
+ Document document = builder.parse(componentLoadFile);
+ Element element = document.getDocumentElement();
+ NodeList loadComponents = element.getElementsByTagName("load-component");
+ for (int i = 0; i < loadComponents.getLength(); i++) {
+ Node loadComponent = loadComponents.item(i);
+ NamedNodeMap attributes = loadComponent.getAttributes();
+ Node componentLocation = attributes.getNamedItem("component-location");
+ if (componentLocation == null) {
+ continue;
+ }
+ ofbizComponents.add(new File(new File(folder, componentLocation.getNodeValue()), "ofbiz-component.xml"));
+ }
+ } else {
+ File[] componentFolders = folder.listFiles(folderFilter);
+ for (File componentFolder: componentFolders) {
+ File ofbizComponent = new File(componentFolder, "ofbiz-component.xml");
+ if (ofbizComponent.exists()) {
+ ofbizComponents.add(ofbizComponent);
+ }
+ }
+ }
+ String nativeLibExt = System.mapLibraryName("someLib").replace("someLib", "").toLowerCase();
+ for (File ofbizComponent: ofbizComponents) {
+ Document document = builder.parse(ofbizComponent);
+ Element element = document.getDocumentElement();
+ if (element.hasAttribute("enabled")) {
+ if ("false".equals(element.getAttribute("enabled"))) {
continue;
}
- // FIXME: filter out other files?
- if (file.isDirectory() && !"CVS".equals(fileName) && !".svn".equals(fileName) && recurse) {
- loadLibs(classPath, file.getCanonicalPath(), recurse);
- } else if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) {
- classPath.addComponent(file);
+ }
+ NodeList classpathEntries = element.getElementsByTagName("classpath");
+ for (int i = 0; i < classpathEntries.getLength(); i++) {
+ Node classpathEntry = classpathEntries.item(i);
+ NamedNodeMap attributes = classpathEntry.getAttributes();
+ Node type = attributes.getNamedItem("type");
+ if (type == null || !("jar".equals(type.getNodeValue()) || "dir".equals(type.getNodeValue()))) {
+ continue;
+ }
+ Node location = attributes.getNamedItem("location");
+ String locationValue = location.getNodeValue();
+ locationValue = locationValue.replace('\\', '/');
+ // set the location to not have a leading slash
+ if (locationValue.startsWith("/")) {
+ locationValue = locationValue.substring(1);
+ }
+ String dirLoc = locationValue;
+ if (dirLoc.endsWith("/*")) {
+ // strip off the slash splat
+ dirLoc = locationValue.substring(0, locationValue.length() - 2);
+ }
+
+ String fileNameSeparator = ("\\".equals(File.separator) ? "\\" + File.separator : File.separator);
+ dirLoc = dirLoc.replaceAll("/+|\\\\+", fileNameSeparator);
+ File path = new File(ofbizComponent.getParent(), dirLoc);
+ if (path.exists()) {
+ if (path.isDirectory()) {
+ if ("dir".equals(type.getNodeValue())) {
+ classpath.addComponent(path.toString());
+ }
+ // load all .jar, .zip files and native libs in this directory
+ boolean containsNativeLibs = false;
+ for (File file: path.listFiles()) {
+ String fileName = file.getName().toLowerCase();
+ if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) {
+ classpath.addComponent(file);
+ } else if (fileName.endsWith(nativeLibExt)) {
+ containsNativeLibs = true;
+ }
+ }
+ if (containsNativeLibs) {
+ libraryPath.addComponent(path);
+ }
+ } else {
+ classpath.addComponent(path.toString());
+ }
}
}
}
}
+
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java Tue Oct 28 08:56:02 2014
@@ -241,9 +241,10 @@ public final class Start {
private void initStartLoaders() throws StartupException {
Classpath classPath = new Classpath();
+ Classpath libraryPath = new Classpath(System.getProperty("java.library.path"));
try {
- this.config.initClasspath(classPath);
- } catch (IOException e) {
+ this.config.initClasspath(classPath, libraryPath);
+ } catch (Exception e) {
throw (StartupException) new StartupException("Couldn't initialized classpath").initCause(e);
}
ClassLoader classloader = classPath.getClassLoader();
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/both.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/both.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/both.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/both.properties Tue Oct 28 08:56:02 2014
@@ -17,20 +17,8 @@
# under the License.
###############################################################################
####
-# OFBiz Startup Application Settings
-####
-
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
+# OFBiz Startup Application Settings
+####
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/install.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/install.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/install.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/install.properties Tue Oct 28 08:56:02 2014
@@ -20,18 +20,6 @@
# OFBiz Startup Application Settings
####
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
-
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/jetty.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/jetty.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/jetty.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/jetty.properties Tue Oct 28 08:56:02 2014
@@ -28,18 +28,6 @@ ofbiz.admin.host=127.0.0.1
ofbiz.admin.port=10523
ofbiz.admin.key=so3du5kasd5dn
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
-
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/pos.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/pos.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/pos.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/pos.properties Tue Oct 28 08:56:02 2014
@@ -20,18 +20,6 @@
# OFBiz Startup Application Settings
####
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
-
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/rmi.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/rmi.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/rmi.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/rmi.properties Tue Oct 28 08:56:02 2014
@@ -20,18 +20,6 @@
# OFBiz Startup Application Settings
####
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
-
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties Tue Oct 28 08:56:02 2014
@@ -20,18 +20,6 @@
# OFBiz Startup Application Settings
####
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
-
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/start.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/start.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/start.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/start.properties Tue Oct 28 08:56:02 2014
@@ -28,18 +28,6 @@ ofbiz.admin.host=127.0.0.1
ofbiz.admin.port=10523
ofbiz.admin.key=so3du5kasd5dn
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
-
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/test.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/test.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/test.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/test.properties Tue Oct 28 08:56:02 2014
@@ -20,18 +20,6 @@
# OFBiz Startup Application Settings
####
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
-
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/testlist.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/testlist.properties?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/testlist.properties (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/testlist.properties Tue Oct 28 08:56:02 2014
@@ -20,17 +20,6 @@
# OFBiz Startup Application Settings
####
-# --- External Base configuration files (relative to ofbiz.home)
-#ofbiz.base.config=framework/base/config
-# --- External Base schema files (relative to ofbiz.home)
-#ofbiz.base.schema=framework/base/dtd
-
-# --- External Base libraries (relative to ofbiz.home)
-#ofbiz.base.lib=framework/base/lib
-
-# --- Base Jar [ofbiz-base.jar] (relative to ofbiz.home)
-#ofbiz.base.jar=framework/base/build/lib/ofbiz-base.jar
-
# --- Default logs directory (relative to ofbiz.home)
#ofbiz.log.dir=runtime/logs
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java Tue Oct 28 08:56:02 2014
@@ -27,7 +27,6 @@ import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.ofbiz.base.component.ComponentConfig;
import org.ofbiz.base.component.ComponentConfig.WebappInfo;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.template.FreeMarkerWorker;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/ContentDocument.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/ContentDocument.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/ContentDocument.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/ContentDocument.java Tue Oct 28 08:56:02 2014
@@ -19,18 +19,20 @@
package org.ofbiz.content.search;
import java.io.IOException;
-import java.lang.String;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
-import java.util.Map;
+import org.apache.lucene.document.Document;
+import org.apache.lucene.document.Field;
+import org.apache.lucene.document.Field.Store;
+import org.apache.lucene.document.StringField;
+import org.apache.lucene.document.TextField;
import org.apache.lucene.index.Term;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.StringUtil;
-import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.content.content.ContentWorker;
@@ -39,12 +41,6 @@ import org.ofbiz.entity.GenericEntityExc
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.LocalDispatcher;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.document.StringField;
-import org.apache.lucene.document.TextField;
-
/**
* ContentDocument Class
*/
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/projectmgr/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/projectmgr/ofbiz-component.xml?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/projectmgr/ofbiz-component.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/projectmgr/ofbiz-component.xml Tue Oct 28 08:56:02 2014
@@ -37,7 +37,6 @@ under the License.
<entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/>
<service-resource type="model" loader="main" location="servicedef/services.xml"/>
- <service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
<webapp name="projectmgr"
title="Project"
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java?rev=1634818&r1=1634817&r2=1634818&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java Tue Oct 28 08:56:02 2014
@@ -21,12 +21,7 @@ package org.ofbiz.scrum;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
-import java.sql.Timestamp;
-import com.ibm.icu.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -36,14 +31,11 @@ import javolution.util.FastSet;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
-import org.ofbiz.entity.condition.EntityConditionList;
-import org.ofbiz.entity.condition.EntityExpr;
import org.ofbiz.entity.condition.EntityOperator;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.service.DispatchContext;