You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2009/10/05 02:08:39 UTC
svn commit: r821643 [3/15] - in /ofbiz/trunk:
applications/accounting/script/org/ofbiz/accounting/test/
applications/accounting/src/org/ofbiz/accounting/
applications/accounting/src/org/ofbiz/accounting/agreement/
applications/accounting/src/org/ofbiz/...
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Mon Oct 5 00:08:27 2009
@@ -41,7 +41,7 @@
import org.ofbiz.base.util.cache.UtilCache;
import org.ofbiz.content.content.ContentServices;
import org.ofbiz.content.content.ContentWorker;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericPK;
import org.ofbiz.entity.GenericValue;
@@ -73,7 +73,7 @@
*/
public static Map<String, Object> getSubContent(DispatchContext dctx, Map<String, ? extends Object> context) {
//Security security = dctx.getSecurity();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
//LocalDispatcher dispatcher = dctx.getDispatcher();
String contentId = (String) context.get("contentId");
String subContentId = (String) context.get("subContentId");
@@ -111,7 +111,7 @@
*/
public static Map<String, Object> getContent(DispatchContext dctx, Map<String, ? extends Object> context) {
//Security security = dctx.getSecurity();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentId = (String) context.get("contentId");
//GenericValue userLogin = (GenericValue)context.get("userLogin");
GenericValue view = null;
@@ -135,7 +135,7 @@
*/
public static Map<String, Object> addMostRecent(DispatchContext dctx, Map<String, ? extends Object> context) {
//Security security = dctx.getSecurity();
- //GenericDelegator delegator = dctx.getDelegator();
+ //Delegator delegator = dctx.getDelegator();
//LocalDispatcher dispatcher = dctx.getDispatcher();
//HttpServletRequest request = (HttpServletRequest)context.get("request");
//String suffix = (String) context.get("suffix");
@@ -162,7 +162,7 @@
* This service does not accept straight ContentAssoc parameters. They must be prefaced with "ca" + cap first letter
*/
public static Map<String, Object> persistContentAndAssoc(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
@@ -453,7 +453,7 @@
*/
public static Map<String, Object> updateSiteRoles(DispatchContext dctx, Map<String, ? extends Object> context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue)context.get("userLogin");
//String userLoginPartyId = userLogin.getString("partyId");
Map results = FastMap.newInstance();
@@ -553,7 +553,7 @@
}
public static Map<String, Object> persistDataResourceAndData(DispatchContext dctx, Map<String, ? extends Object> context) {
- //GenericDelegator delegator = dctx.getDelegator();
+ //Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
//String contentId = (String)context.get("contentId");
Map result = FastMap.newInstance();
@@ -587,7 +587,7 @@
}
public static Map<String, Object> persistDataResourceAndDataMethod(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException, GenericEntityException, Exception {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
Map result = FastMap.newInstance();
@@ -762,7 +762,7 @@
return result;
}
- public static void addRoleToUser(GenericDelegator delegator, LocalDispatcher dispatcher, Map serviceContext) throws GenericServiceException, GenericEntityException {
+ public static void addRoleToUser(Delegator delegator, LocalDispatcher dispatcher, Map serviceContext) throws GenericServiceException, GenericEntityException {
String partyId = (String)serviceContext.get("partyId");
Map findMap = UtilMisc.toMap("partyId", partyId);
List userLoginList = delegator.findByAnd("UserLogin", findMap);
@@ -778,7 +778,7 @@
public static Map<String, Object> updateSiteRolesDyn(DispatchContext dctx, Map<String, ? extends Object> context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Map results = FastMap.newInstance();
Map serviceContext = FastMap.newInstance();
// siteContentId will equal "ADMIN_MASTER", "AGINC_MASTER", etc.
@@ -852,7 +852,7 @@
public static Map<String, Object> updateOrRemove(DispatchContext dctx, Map<String, ? extends Object> context) {
Map results = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String entityName = (String)context.get("entityName");
String action = (String)context.get("action");
String pkFieldCount = (String)context.get("pkFieldCount");
@@ -898,7 +898,7 @@
public static Map<String, Object> resequence(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentIdTo = (String)context.get("contentIdTo");
Integer seqInc = (Integer)context.get("seqInc");
if (seqInc == null)
@@ -971,7 +971,7 @@
public static Map<String, Object> changeLeafToNode(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String contentId = (String)context.get("contentId");
GenericValue userLogin = (GenericValue)context.get("userLogin");
@@ -1039,7 +1039,7 @@
public static Map<String, Object> updateLeafCount(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
List typeList = (List)context.get("typeList");
if (typeList == null)
typeList = UtilMisc.toList("PUBLISH_LINK", "SUB_CONTENT");
@@ -1058,7 +1058,7 @@
public static Map<String, Object> updateLeafChange(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
List typeList = (List)context.get("typeList");
if (typeList == null)
typeList = UtilMisc.toList("PUBLISH_LINK", "SUB_CONTENT");
@@ -1120,7 +1120,7 @@
*/
public static Map<String, Object> updatePageType(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException{
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
Map results = FastMap.newInstance();
Set visitedSet = (Set)context.get("visitedSet");
@@ -1161,7 +1161,7 @@
public static Map<String, Object> resetToOutlineMode(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException{
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
Map results = FastMap.newInstance();
Set visitedSet = (Set)context.get("visitedSet");
@@ -1322,7 +1322,7 @@
public static Map<String, Object> findSubNodes(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map results = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentIdTo = (String)context.get("contentId");
List condList = FastList.newInstance();
EntityExpr expr = EntityCondition.makeCondition("caContentIdTo", EntityOperator.EQUALS, contentIdTo);
@@ -1381,7 +1381,7 @@
public static Map<String, Object> incrementContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentId = (String)context.get("contentId");
String contentAssocTypeId = (String)context.get("contentAssocTypeId");
@@ -1407,7 +1407,7 @@
public static Map<String, Object> decrementContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentId = (String)context.get("contentId");
String contentAssocTypeId = (String)context.get("contentAssocTypeId");
@@ -1433,7 +1433,7 @@
public static Map<String, Object> updateContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentId = (String)context.get("contentId");
String contentAssocTypeId = (String)context.get("contentAssocTypeId");
@@ -1454,7 +1454,7 @@
public static Map<String, Object> updateContentSubscription(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
@@ -1534,7 +1534,7 @@
public static Map<String, Object> updateContentSubscriptionByProduct(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException{
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String productId = (String) context.get("productId");
Integer qty = (Integer) context.get("quantity");
@@ -1581,7 +1581,7 @@
public static Map<String, Object> updateContentSubscriptionByOrder(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException{
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String orderId = (String) context.get("orderId");
@@ -1632,7 +1632,7 @@
public static Map<String, Object> followNodeChildren(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{
Map result = null;
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Security security = dctx.getSecurity();
GenericValue userLogin = (GenericValue)context.get("userLogin");
@@ -1697,7 +1697,7 @@
*/
public static Map<String, Object> persistContentWithRevision(DispatchContext dctx, Map<String, ? extends Object> context) {
Map result = null;
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue dataResource = null;
String masterRevisionContentId = (String)context.get("masterRevisionContentId");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java Mon Oct 5 00:08:27 2009
@@ -40,7 +40,7 @@
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.collections.LifoSet;
import org.ofbiz.content.content.ContentServicesComplex;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntity;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericPK;
@@ -213,7 +213,7 @@
return ret;
} */
- public static void getCurrentValue(HttpServletRequest request, GenericDelegator delegator) {
+ public static void getCurrentValue(HttpServletRequest request, Delegator delegator) {
HttpSession session = request.getSession();
@@ -234,7 +234,7 @@
currentEntityMap.put(entityName, currentPK);
}
- public static void getCurrentValueWithCachedPK(HttpServletRequest request, GenericDelegator delegator, GenericPK cachedPK, String entityName) {
+ public static void getCurrentValueWithCachedPK(HttpServletRequest request, Delegator delegator, GenericPK cachedPK, String entityName) {
Map paramMap = UtilHttp.getParameterMap(request);
// Build the primary key that may have been passed in as key values
@@ -314,7 +314,7 @@
}
- public static List getPermittedPublishPoints(GenericDelegator delegator, List allPublishPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException {
+ public static List getPermittedPublishPoints(Delegator delegator, List allPublishPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException {
List permittedPublishPointList = FastList.newInstance();
@@ -355,7 +355,7 @@
@param parentPubPt The parent publish point.
*/
- public static List getAllPublishPoints(GenericDelegator delegator, String parentPubPt) throws GeneralException {
+ public static List getAllPublishPoints(Delegator delegator, String parentPubPt) throws GeneralException {
GenericValue rootContent = null;
List relatedPubPts = null;
@@ -383,7 +383,7 @@
return allPublishPoints;
}
- public static Map getPublishPointMap(GenericDelegator delegator, String pubPtId) throws GeneralException {
+ public static Map getPublishPointMap(Delegator delegator, String pubPtId) throws GeneralException {
List publishPointList = getAllPublishPoints(delegator, pubPtId);
Map publishPointMap = FastMap.newInstance();
@@ -397,7 +397,7 @@
}
- public static void getAllPublishPointMap(GenericDelegator delegator, String pubPtId, Map publishPointMap) throws GeneralException {
+ public static void getAllPublishPointMap(Delegator delegator, String pubPtId, Map publishPointMap) throws GeneralException {
List publishPointList = getAllPublishPoints(delegator, pubPtId);
Iterator it = publishPointList.iterator();
@@ -409,7 +409,7 @@
}
}
- public static Map getPublishPointMap(GenericDelegator delegator, List publishPointList) {
+ public static Map getPublishPointMap(Delegator delegator, List publishPointList) {
Map publishPointMap = FastMap.newInstance();
Iterator it = publishPointList.iterator();
@@ -421,7 +421,7 @@
return publishPointMap;
}
- public static List getStaticValues(GenericDelegator delegator, String parentPlaceholderId, List permittedPublishPointList) throws GeneralException {
+ public static List getStaticValues(Delegator delegator, String parentPlaceholderId, List permittedPublishPointList) throws GeneralException {
List assocValueList = null;
try {
@@ -465,11 +465,11 @@
return staticValueList;
}
- public static GenericValue getWebSitePublishPoint(GenericDelegator delegator, String contentId) throws GenericEntityException {
+ public static GenericValue getWebSitePublishPoint(Delegator delegator, String contentId) throws GenericEntityException {
return getWebSitePublishPoint(delegator, contentId, false);
}
- public static GenericValue getWebSitePublishPoint(GenericDelegator delegator, String contentId, boolean ignoreCache) throws GenericEntityException {
+ public static GenericValue getWebSitePublishPoint(Delegator delegator, String contentId, boolean ignoreCache) throws GenericEntityException {
GenericValue webSitePublishPoint = null;
if (!ignoreCache)
webSitePublishPoint = (GenericValue)cachedWebSitePublishPoints.get(contentId);
@@ -487,7 +487,7 @@
return webSitePublishPoint;
}
- public static GenericValue overrideWebSitePublishPoint(GenericDelegator delegator, GenericValue passedValue) throws GenericEntityException {
+ public static GenericValue overrideWebSitePublishPoint(Delegator delegator, GenericValue passedValue) throws GenericEntityException {
String contentId = passedValue.getString("contentId");
GenericValue webSitePublishPoint = passedValue;
String contentIdTo = getParentWebSitePublishPointId(delegator, contentId);
@@ -506,14 +506,14 @@
return webSitePublishPoint;
}
- public static GenericValue getParentWebSitePublishPointValue(GenericDelegator delegator, String contentId) throws GenericEntityException {
+ public static GenericValue getParentWebSitePublishPointValue(Delegator delegator, String contentId) throws GenericEntityException {
String contentIdTo = getParentWebSitePublishPointId(delegator, contentId);
GenericValue content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentIdTo));
return content;
}
- public static String getParentWebSitePublishPointId(GenericDelegator delegator, String contentId) throws GenericEntityException {
+ public static String getParentWebSitePublishPointId(Delegator delegator, String contentId) throws GenericEntityException {
String contentIdTo = null;
@@ -527,7 +527,7 @@
return contentIdTo;
}
- public static GenericValue getStaticValue(GenericDelegator delegator, String parentPlaceholderId, String webSitePublishPointId, boolean ignoreCache) throws GenericEntityException {
+ public static GenericValue getStaticValue(Delegator delegator, String parentPlaceholderId, String webSitePublishPointId, boolean ignoreCache) throws GenericEntityException {
GenericValue webSitePublishPoint = null;
GenericValue staticValue = null;
if (!ignoreCache) {
@@ -554,7 +554,7 @@
}
- public static List getPublishedLinks(GenericDelegator delegator, String targContentId, String rootPubId, GenericValue userLogin, Security security, String permittedAction, String permittedOperations , String passedRoles) throws GeneralException {
+ public static List getPublishedLinks(Delegator delegator, String targContentId, String rootPubId, GenericValue userLogin, Security security, String permittedAction, String permittedOperations , String passedRoles) throws GeneralException {
// Set up one map with all the top-level publish points (to which only one sub point can be attached to)
// and another map (publishPointMapAll) that points to one of the top-level points.
@@ -636,7 +636,7 @@
return publishedLinkList;
}
- public static GenericValue getAuthorContent(GenericDelegator delegator, String contentId) {
+ public static GenericValue getAuthorContent(Delegator delegator, String contentId) {
GenericValue authorContent = null;
try {
@@ -660,7 +660,7 @@
return authorContent;
}
- public static List getPermittedDepartmentPoints(GenericDelegator delegator, List allDepartmentPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException {
+ public static List getPermittedDepartmentPoints(Delegator delegator, List allDepartmentPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException {
List permittedDepartmentPointList = FastList.newInstance();
@@ -700,7 +700,7 @@
@param parentPubPt The parent publish point.
*/
- public static List getAllDepartmentContent(GenericDelegator delegator, String parentPubPt) throws GeneralException {
+ public static List getAllDepartmentContent(Delegator delegator, String parentPubPt) throws GeneralException {
GenericValue rootContent = null;
List relatedPubPts = null;
@@ -728,14 +728,14 @@
public static String getUserName(HttpServletRequest request, String userLoginId) throws GenericEntityException {
String userName = null;
- GenericDelegator delegator = (GenericDelegator)request.getAttribute("delegator");
+ Delegator delegator = (Delegator)request.getAttribute("delegator");
GenericValue userLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", userLoginId));
GenericValue person = userLogin.getRelatedOneCache("Person");
userName = person.getString("firstName") + " " + person.getString("lastName");
return userName;
}
- public static int updateStatsTopDown(GenericDelegator delegator, String contentId, List typeList) throws GenericEntityException {
+ public static int updateStatsTopDown(Delegator delegator, String contentId, List typeList) throws GenericEntityException {
int subLeafCount = 0;
GenericValue thisContent = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId));
if (thisContent == null)
@@ -767,7 +767,7 @@
return subLeafCount;
}
- public static void updateStatsBottomUp(GenericDelegator delegator, String contentId, List typeList, int branchChangeAmount, int leafChangeAmount) throws GenericEntityException {
+ public static void updateStatsBottomUp(Delegator delegator, String contentId, List typeList, int branchChangeAmount, int leafChangeAmount) throws GenericEntityException {
GenericValue thisContent = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId));
if (thisContent == null)
throw new RuntimeException("No entity found for id=" + contentId);
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java Mon Oct 5 00:08:27 2009
@@ -31,7 +31,7 @@
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.DispatchContext;
@@ -64,7 +64,7 @@
public static Map<String, Object> convertTree(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String file = (String) context.get("file");
@@ -255,7 +255,7 @@
}
public static Map<String,Object> createSubContent(int index,String line,String rootContent, Map context, DispatchContext dctx) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java Mon Oct 5 00:08:27 2009
@@ -32,7 +32,7 @@
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.content.content.ContentWorker;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -68,7 +68,7 @@
mainLink = mainLink + "?blogContentId=" + contentId;
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
// get the main blog content
GenericValue content = null;
@@ -96,7 +96,7 @@
return resp;
}
- public static List generateEntryList(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, String entryLink, Locale locale, GenericValue userLogin) {
+ public static List generateEntryList(LocalDispatcher dispatcher, Delegator delegator, String contentId, String entryLink, Locale locale, GenericValue userLogin) {
List entries = FastList.newInstance();
List exprs = FastList.newInstance();
exprs.add(EntityCondition.makeCondition("contentIdStart", contentId));
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Mon Oct 5 00:08:27 2009
@@ -42,7 +42,7 @@
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.collections.MapStack;
import org.ofbiz.content.content.ContentWorker;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.util.EntityUtil;
@@ -61,7 +61,7 @@
public static final String module = CmsEvents.class.getName();
public static String cms(HttpServletRequest request, HttpServletResponse response) {
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
ServletContext servletContext = request.getSession().getServletContext();
HttpSession session = request.getSession();
@@ -262,7 +262,7 @@
//throw new GeneralRuntimeException("Unknown request; this request does not exist or cannot be called directly.");
}
- protected static boolean verifyContentToWebSite(GenericDelegator delegator, String webSiteId, String contentId) throws GeneralException {
+ protected static boolean verifyContentToWebSite(Delegator delegator, String webSiteId, String contentId) throws GeneralException {
// first check if the passed in contentId is a publish point for the web site
List<GenericValue> publishPoints = null;
try {
@@ -295,7 +295,7 @@
return false;
}
- protected static boolean verifySubContent(GenericDelegator delegator, String contentId, String contentIdFrom) throws GeneralException {
+ protected static boolean verifySubContent(Delegator delegator, String contentId, String contentIdFrom) throws GeneralException {
List<GenericValue> contentAssoc = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", contentIdFrom, "contentIdTo", contentId, "contentAssocTypeId", "SUB_CONTENT"));
contentAssoc = EntityUtil.filterByDate(contentAssoc);
if (contentAssoc == null || contentAssoc.size() == 0) {
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java Mon Oct 5 00:08:27 2009
@@ -40,7 +40,7 @@
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.UtilFormatOut;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.GenericServiceException;
@@ -70,7 +70,7 @@
public static String persistRootCompDoc(HttpServletRequest request, HttpServletResponse response) {
Map paramMap = UtilHttp.getParameterMap(request);
- GenericDelegator delegator = (GenericDelegator)request.getAttribute("delegator");
+ Delegator delegator = (Delegator)request.getAttribute("delegator");
LocalDispatcher dispatcher = (LocalDispatcher)request.getAttribute("dispatcher");
Locale locale = UtilHttp.getLocale(request);
HttpSession session = request.getSession();
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java Mon Oct 5 00:08:27 2009
@@ -37,7 +37,7 @@
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.content.data.DataResourceWorker;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -77,7 +77,7 @@
public static Map<String, Object> persistRootCompDoc(DispatchContext dctx, Map<String, ? extends Object> context) {
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Locale locale = (Locale)context.get("locale");
GenericValue userLogin = (GenericValue)context.get("userLogin");
@@ -148,7 +148,7 @@
String webSiteId = (String) context.get("webSiteId");
String https = (String) context.get("https");
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentId = (String) context.get("contentId");
String contentRevisionSeqId = (String) context.get("contentRevisionSeqId");
@@ -307,7 +307,7 @@
String webSiteId = (String) context.get("webSiteId");
String https = (String) context.get("https");
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentId = (String) context.get("contentId");
String contentRevisionSeqId = (String) context.get("contentRevisionSeqId");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java Mon Oct 5 00:08:27 2009
@@ -19,7 +19,7 @@
package org.ofbiz.content.content;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.util.EntityUtil;
@@ -62,7 +62,7 @@
}
protected final LocalDispatcher dispatcher;
- protected final GenericDelegator delegator;
+ protected final Delegator delegator;
protected final String contentId;
protected final GenericValue value;
protected final Map context;
@@ -95,7 +95,7 @@
init();
}
- private ContentMapFacade(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, Map context, Locale locale, String mimeTypeId, boolean cache) {
+ private ContentMapFacade(LocalDispatcher dispatcher, Delegator delegator, String contentId, Map context, Locale locale, String mimeTypeId, boolean cache) {
this.dispatcher = dispatcher;
this.delegator = delegator;
this.contentId = contentId;
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java Mon Oct 5 00:08:27 2009
@@ -28,7 +28,7 @@
import org.ofbiz.base.util.StringUtil;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entityext.permission.EntityPermissionChecker;
@@ -93,7 +93,7 @@
Debug.logWarning(new Exception(), "This service has been depricated in favor of [genericContentPermission]", module);
Security security = dctx.getSecurity();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String statusId = (String) context.get("statusId");
String privilegeEnumId = (String) context.get("privilegeEnumId");
GenericValue content = (GenericValue) context.get("currentContent");
@@ -261,7 +261,7 @@
Map results = FastMap.newInstance();
Security security = dctx.getSecurity();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Boolean bDisplayFailCond = (Boolean)context.get("displayFailCond");
String contentIdFrom = (String) context.get("contentIdFrom");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java Mon Oct 5 00:08:27 2009
@@ -39,7 +39,7 @@
import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -167,7 +167,7 @@
* This is a generic service for traversing a Content tree, typical of a blog response tree. It calls the ContentWorker.traverse method.
*/
public static Map<String, Object> traverseContent(DispatchContext dctx, Map<String, ? extends Object> context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Map results = FastMap.newInstance();
String contentId = (String) context.get("contentId");
@@ -257,7 +257,7 @@
Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
Map result = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String contentId = (String) context.get("contentId");
//String contentTypeId = (String) context.get("contentTypeId");
@@ -352,7 +352,7 @@
context.put("targetOperationList", targetOperationList);
context.put("contentPurposeList", contentPurposeList);
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map result = FastMap.newInstance();
@@ -518,7 +518,7 @@
*/
public static Map<String, Object> updateContentMethod(DispatchContext dctx, Map<String, ? extends Object> rcontext) {
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map result = FastMap.newInstance();
@@ -599,7 +599,7 @@
*/
public static Map<String, Object> updateContentAssocMethod(DispatchContext dctx, Map<String, ? extends Object> rcontext) {
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map result = FastMap.newInstance();
@@ -712,7 +712,7 @@
*/
public static Map<String, Object> deactivateContentAssocMethod(DispatchContext dctx, Map<String, ? extends Object> rcontext) {
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map result = FastMap.newInstance();
@@ -789,7 +789,7 @@
* Deactivates any active ContentAssoc (except the current one) that is associated with the passed in template/layout contentId and mapKey.
*/
public static Map<String, Object> deactivateAssocs(DispatchContext dctx, Map<String, ? extends Object> context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String contentIdTo = (String) context.get("contentIdTo");
String mapKey = (String) context.get("mapKey");
String contentAssocTypeId = (String) context.get("contentAssocTypeId");
@@ -855,7 +855,7 @@
*/
public static Map<String, Object> renderSubContentAsText(DispatchContext dctx, Map<String, ? extends Object> context) {
Map results = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map templateContext = (Map) context.get("templateContext");
@@ -917,7 +917,7 @@
public static Map<String, Object> renderContentAsText(DispatchContext dctx, Map<String, ? extends Object> context) {
Map results = FastMap.newInstance();
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Writer out = (Writer) context.get("outWriter");
Map templateContext = (Map) context.get("templateContext");
@@ -961,7 +961,7 @@
public static Map<String, Object> linkContentToPubPt(DispatchContext dctx, Map<String, ? extends Object> context) {
Map results = FastMap.newInstance();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String contentId = (String) context.get("contentId");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java Mon Oct 5 00:08:27 2009
@@ -32,7 +32,7 @@
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -64,7 +64,7 @@
*/
public static Map<String, Object> getAssocAndContentAndDataResource(DispatchContext dctx, Map<String, ? extends Object> context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
List assocTypes = (List) context.get("assocTypes");
List contentTypes = (List)context.get("contentTypes");
Timestamp fromDate = (Timestamp)context.get("fromDate");
@@ -81,7 +81,7 @@
return results;
}
- public static Map getAssocAndContentAndDataResourceMethod(GenericDelegator delegator, String contentId, String mapKey, String direction, Timestamp fromDate, Timestamp thruDate, String fromDateStr, String thruDateStr, List assocTypes, List contentTypes) {
+ public static Map getAssocAndContentAndDataResourceMethod(Delegator delegator, String contentId, String mapKey, String direction, Timestamp fromDate, Timestamp thruDate, String fromDateStr, String thruDateStr, List assocTypes, List contentTypes) {
List exprList = FastList.newInstance();
EntityExpr joinExpr = null;
@@ -170,7 +170,7 @@
*/
public static Map<String, Object> getAssocAndContentAndDataResourceCache(DispatchContext dctx, Map<String, ? extends Object> context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
List assocTypes = (List) context.get("assocTypes");
String assocTypesString = (String)context.get("assocTypesString");
if (UtilValidate.isNotEmpty(assocTypesString)) {
@@ -210,7 +210,7 @@
}
- public static Map getAssocAndContentAndDataResourceCacheMethod(GenericDelegator delegator, String contentId, String mapKey, String direction,
+ public static Map getAssocAndContentAndDataResourceCacheMethod(Delegator delegator, String contentId, String mapKey, String direction,
Timestamp fromDate, String fromDateStr, List assocTypes, List contentTypes, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GenericEntityException, MiniLangException {
Map results = getAssocAndContentAndDataResourceCacheMethod(delegator,
contentId, mapKey, direction, fromDate, fromDateStr, assocTypes,
@@ -218,7 +218,7 @@
return results;
}
- public static Map getAssocAndContentAndDataResourceCacheMethod(GenericDelegator delegator, String contentId, String mapKey, String direction,
+ public static Map getAssocAndContentAndDataResourceCacheMethod(Delegator delegator, String contentId, String mapKey, String direction,
Timestamp fromDate, String fromDateStr, List assocTypes, List contentTypes, Boolean nullThruDatesOnly, String contentAssocPredicateId, String orderBy) throws GenericEntityException, MiniLangException {
//List exprList = FastList.newInstance();
@@ -340,7 +340,7 @@
}
/*
- public static Map getSubContentAndDataResource(GenericDelegator delegator, String contentId, String direction, Timestamp fromDate, String assocType, String contentType, String orderBy) throws GenericEntityException {
+ public static Map getSubContentAndDataResource(Delegator delegator, String contentId, String direction, Timestamp fromDate, String assocType, String contentType, String orderBy) throws GenericEntityException {
List exprList = FastList.newInstance();
EntityExpr joinExpr = null;
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Mon Oct 5 00:08:27 2009
@@ -44,7 +44,7 @@
import org.ofbiz.base.util.string.FlexibleStringExpander;
import org.ofbiz.content.ContentManagementWorker;
import org.ofbiz.content.data.DataResourceWorker;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericPK;
import org.ofbiz.entity.GenericValue;
@@ -76,39 +76,39 @@
public ContentWorker() { }
- public GenericValue getWebSitePublishPointExt(GenericDelegator delegator, String contentId, boolean ignoreCache) throws GenericEntityException {
+ public GenericValue getWebSitePublishPointExt(Delegator delegator, String contentId, boolean ignoreCache) throws GenericEntityException {
return ContentManagementWorker.getWebSitePublishPoint(delegator, contentId, ignoreCache);
}
- public GenericValue getCurrentContentExt(GenericDelegator delegator, List trail, GenericValue userLogin, Map ctx, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GeneralException {
+ public GenericValue getCurrentContentExt(Delegator delegator, List trail, GenericValue userLogin, Map ctx, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GeneralException {
return getCurrentContent(delegator, trail, userLogin, ctx, nullThruDatesOnly, contentAssocPredicateId);
}
- public String getMimeTypeIdExt(GenericDelegator delegator, GenericValue view, Map<String, Object> ctx) {
+ public String getMimeTypeIdExt(Delegator delegator, GenericValue view, Map<String, Object> ctx) {
return getMimeTypeId(delegator, view, ctx);
}
// new rendering methods
- public void renderContentAsTextExt(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, Appendable out, Map<String, Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
+ public void renderContentAsTextExt(LocalDispatcher dispatcher, Delegator delegator, String contentId, Appendable out, Map<String, Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
renderContentAsText(dispatcher, delegator, contentId, out, templateContext, locale, mimeTypeId, null, null, cache);
}
- public void renderSubContentAsTextExt(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, Appendable out, String mapKey, Map<String, Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
+ public void renderSubContentAsTextExt(LocalDispatcher dispatcher, Delegator delegator, String contentId, Appendable out, String mapKey, Map<String, Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
renderSubContentAsText(dispatcher, delegator, contentId, out, mapKey, templateContext, locale, mimeTypeId, cache);
}
- public String renderSubContentAsTextExt(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, String mapKey, Map<String, Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
+ public String renderSubContentAsTextExt(LocalDispatcher dispatcher, Delegator delegator, String contentId, String mapKey, Map<String, Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
return renderSubContentAsText(dispatcher, delegator, contentId, mapKey, templateContext, locale, mimeTypeId, cache);
}
- public String renderContentAsTextExt(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, Map<String, Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
+ public String renderContentAsTextExt(LocalDispatcher dispatcher, Delegator delegator, String contentId, Map<String, Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
return renderContentAsText(dispatcher, delegator, contentId, templateContext, locale, mimeTypeId, cache);
}
// -------------------------------------
// Content rendering methods
// -------------------------------------
- public static GenericValue findContentForRendering(GenericDelegator delegator, String contentId, Locale locale, String partyId, String roleTypeId, boolean cache) throws GeneralException, IOException {
+ public static GenericValue findContentForRendering(Delegator delegator, String contentId, Locale locale, String partyId, String roleTypeId, boolean cache) throws GeneralException, IOException {
GenericValue content;
if (UtilValidate.isEmpty(contentId)) {
Debug.logError("No content ID found.", module);
@@ -179,7 +179,7 @@
return content;
}
- public static void renderContentAsText(LocalDispatcher dispatcher, GenericDelegator delegator, GenericValue content, Appendable out,
+ public static void renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, GenericValue content, Appendable out,
Map<String,Object>templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
// if the content has a service attached run the service
@@ -306,27 +306,27 @@
}
}
- public static String renderContentAsText(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, Map<String, Object> templateContext,
+ public static String renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, Map<String, Object> templateContext,
Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
Writer writer = new StringWriter();
renderContentAsText(dispatcher, delegator, contentId, writer, templateContext, locale, mimeTypeId, null, null, cache);
return writer.toString();
}
- public static void renderContentAsText(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, Appendable out,
+ public static void renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, Appendable out,
Map<String, Object> templateContext, Locale locale, String mimeTypeId, String partyId, String roleTypeId, boolean cache) throws GeneralException, IOException {
GenericValue content = ContentWorker.findContentForRendering(delegator, contentId, locale, partyId, roleTypeId, cache);
ContentWorker.renderContentAsText(dispatcher, delegator, content, out, templateContext, locale, mimeTypeId, cache);
}
- public static String renderSubContentAsText(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, String mapKey, Map<String, Object> templateContext,
+ public static String renderSubContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, String mapKey, Map<String, Object> templateContext,
Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
Writer writer = new StringWriter();
renderSubContentAsText(dispatcher, delegator, contentId, writer, mapKey, templateContext, locale, mimeTypeId, cache);
return writer.toString();
}
- public static void renderSubContentAsText(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, Appendable out, String mapKey,
+ public static void renderSubContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, Appendable out, String mapKey,
Map<String,Object> templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
// find the sub-content with matching mapKey
@@ -351,7 +351,7 @@
}
}
- public static GenericValue findAlternateLocaleContent(GenericDelegator delegator, GenericValue view, Locale locale) {
+ public static GenericValue findAlternateLocaleContent(Delegator delegator, GenericValue view, Locale locale) {
GenericValue contentAssocDataResourceViewFrom = view;
if (locale == null) {
return contentAssocDataResourceViewFrom;
@@ -412,7 +412,7 @@
return contentAssocDataResourceViewFrom;
}
- public static void traverse(GenericDelegator delegator, GenericValue content, Timestamp fromDate, Timestamp thruDate, Map<String, Object> whenMap, int depthIdx, Map<String, Object> masterNode, String contentAssocTypeId, List<GenericValue> pickList, String direction) {
+ public static void traverse(Delegator delegator, GenericValue content, Timestamp fromDate, Timestamp thruDate, Map<String, Object> whenMap, int depthIdx, Map<String, Object> masterNode, String contentAssocTypeId, List<GenericValue> pickList, String direction) {
//String startContentAssocTypeId = null;
String contentTypeId = null;
@@ -647,7 +647,7 @@
public static void selectKids(Map currentNode, Map ctx) {
- GenericDelegator delegator = (GenericDelegator) ctx.get("delegator");
+ Delegator delegator = (Delegator) ctx.get("delegator");
GenericValue parentContent = (GenericValue) currentNode.get("value");
String contentAssocTypeId = (String) ctx.get("contentAssocTypeId");
String contentTypeId = (String) ctx.get("contentTypeId");
@@ -739,7 +739,7 @@
public static List getAssociatedContent(GenericValue currentContent, String linkDir, List assocTypes, List contentTypes, String fromDate, String thruDate)
throws GenericEntityException {
- GenericDelegator delegator = currentContent.getDelegator();
+ Delegator delegator = currentContent.getDelegator();
List<GenericValue> assocList = getAssociations(currentContent, linkDir, assocTypes, fromDate, thruDate);
if (UtilValidate.isEmpty(assocList)) {
return assocList;
@@ -808,13 +808,13 @@
exprListAnd.add(expr);
}
EntityConditionList contentCondList = EntityCondition.makeCondition(exprListAnd, EntityOperator.AND);
- GenericDelegator delegator = currentContent.getDelegator();
+ Delegator delegator = currentContent.getDelegator();
contentList = delegator.findList(contentAssocViewName, contentCondList, null, null, null, false);
return contentList;
}
public static List<GenericValue> getAssociations(GenericValue currentContent, String linkDir, List<GenericValue> assocTypes, String strFromDate, String strThruDate) throws GenericEntityException {
- GenericDelegator delegator = currentContent.getDelegator();
+ Delegator delegator = currentContent.getDelegator();
String origContentId = (String) currentContent.get("contentId");
Timestamp fromDate = null;
if (strFromDate != null) {
@@ -829,7 +829,7 @@
return assocs;
}
- public static List<GenericValue> getContentAssocsWithId(GenericDelegator delegator, String contentId, Timestamp fromDate, Timestamp thruDate, String direction, List assocTypes) throws GenericEntityException {
+ public static List<GenericValue> getContentAssocsWithId(Delegator delegator, String contentId, Timestamp fromDate, Timestamp thruDate, String direction, List assocTypes) throws GenericEntityException {
List exprList = FastList.newInstance();
EntityExpr joinExpr = null;
EntityExpr expr = null;
@@ -887,7 +887,7 @@
return relatedAssocs;
}
- public static void getContentTypeAncestry(GenericDelegator delegator, String contentTypeId, List contentTypes) throws GenericEntityException {
+ public static void getContentTypeAncestry(Delegator delegator, String contentTypeId, List contentTypes) throws GenericEntityException {
contentTypes.add(contentTypeId);
GenericValue contentTypeValue = delegator.findByPrimaryKey("ContentType", UtilMisc.toMap("contentTypeId", contentTypeId));
if (contentTypeValue == null)
@@ -898,7 +898,7 @@
}
}
- public static void getContentAncestry(GenericDelegator delegator, String contentId, String contentAssocTypeId, String direction, List contentAncestorList) throws GenericEntityException {
+ public static void getContentAncestry(Delegator delegator, String contentId, String contentAssocTypeId, String direction, List contentAncestorList) throws GenericEntityException {
String contentIdField = null;
String contentIdOtherField = null;
if (direction != null && direction.equalsIgnoreCase("to")) {
@@ -933,7 +933,7 @@
}
}
- public static void getContentAncestryAll(GenericDelegator delegator, String contentId, String passedContentTypeId, String direction, List contentAncestorList) {
+ public static void getContentAncestryAll(Delegator delegator, String contentId, String passedContentTypeId, String direction, List contentAncestorList) {
String contentIdField = null;
String contentIdOtherField = null;
if (direction != null && direction.equalsIgnoreCase("to")) {
@@ -971,7 +971,7 @@
}
}
- public static List<Map<String, Object>> getContentAncestryNodeTrail(GenericDelegator delegator, String contentId, String contentAssocTypeId, String direction) throws GenericEntityException {
+ public static List<Map<String, Object>> getContentAncestryNodeTrail(Delegator delegator, String contentId, String contentAssocTypeId, String direction) throws GenericEntityException {
List contentAncestorList = FastList.newInstance();
List<Map<String, Object>> nodeTrail = FastList.newInstance();
@@ -985,7 +985,7 @@
return nodeTrail;
}
- public static String getContentAncestryNodeTrailCsv(GenericDelegator delegator, String contentId, String contentAssocTypeId, String direction) throws GenericEntityException {
+ public static String getContentAncestryNodeTrailCsv(Delegator delegator, String contentId, String contentAssocTypeId, String direction) throws GenericEntityException {
List contentAncestorList = FastList.newInstance();
getContentAncestry(delegator, contentId, contentAssocTypeId, direction, contentAncestorList);
@@ -993,7 +993,7 @@
return csv;
}
- public static void getContentAncestryValues(GenericDelegator delegator, String contentId, String contentAssocTypeId, String direction, List contentAncestorList) throws GenericEntityException {
+ public static void getContentAncestryValues(Delegator delegator, String contentId, String contentAssocTypeId, String direction, List contentAncestorList) throws GenericEntityException {
String contentIdField = null;
String contentIdOtherField = null;
if (direction != null && direction.equalsIgnoreCase("to")) {
@@ -1023,7 +1023,7 @@
}
}
- public static Map pullEntityValues(GenericDelegator delegator, String entityName, Map context) {
+ public static Map pullEntityValues(Delegator delegator, String entityName, Map context) {
GenericValue entOut = delegator.makeValue(entityName);
entOut.setPKFields(context);
entOut.setNonPKFields(context);
@@ -1033,13 +1033,13 @@
/**
* callContentPermissionCheck Formats data for a call to the checkContentPermission service.
*/
- public static String callContentPermissionCheck(GenericDelegator delegator, LocalDispatcher dispatcher, Map context) {
+ public static String callContentPermissionCheck(Delegator delegator, LocalDispatcher dispatcher, Map context) {
Map permResults = callContentPermissionCheckResult(delegator, dispatcher, context);
String permissionStatus = (String) permResults.get("permissionStatus");
return permissionStatus;
}
- public static Map callContentPermissionCheckResult(GenericDelegator delegator, LocalDispatcher dispatcher, Map context) {
+ public static Map callContentPermissionCheckResult(Delegator delegator, LocalDispatcher dispatcher, Map context) {
Map permResults = FastMap.newInstance();
String skipPermissionCheck = (String) context.get("skipPermissionCheck");
@@ -1069,7 +1069,7 @@
return permResults;
}
- public static GenericValue getSubContent(GenericDelegator delegator, String contentId, String mapKey, String subContentId, GenericValue userLogin, List assocTypes, Timestamp fromDate) throws IOException {
+ public static GenericValue getSubContent(Delegator delegator, String contentId, String mapKey, String subContentId, GenericValue userLogin, List assocTypes, Timestamp fromDate) throws IOException {
//GenericValue content = null;
GenericValue view = null;
try {
@@ -1098,7 +1098,7 @@
return view;
}
- public static GenericValue getSubContentCache(GenericDelegator delegator, String contentId, String mapKey, String subContentId, GenericValue userLogin, List assocTypes, Timestamp fromDate, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GenericEntityException {
+ public static GenericValue getSubContentCache(Delegator delegator, String contentId, String mapKey, String subContentId, GenericValue userLogin, List assocTypes, Timestamp fromDate, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GenericEntityException {
//GenericValue content = null;
GenericValue view = null;
if (UtilValidate.isEmpty(subContentId)) {
@@ -1109,7 +1109,7 @@
return view;
}
- public static GenericValue getSubContentCache(GenericDelegator delegator, String contentId, String mapKey, GenericValue userLogin, List assocTypes, Timestamp fromDate, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GenericEntityException {
+ public static GenericValue getSubContentCache(Delegator delegator, String contentId, String mapKey, GenericValue userLogin, List assocTypes, Timestamp fromDate, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GenericEntityException {
//GenericValue content = null;
GenericValue view = null;
if (contentId == null) {
@@ -1134,7 +1134,7 @@
return view;
}
- public static GenericValue getContentCache(GenericDelegator delegator, String contentId) throws GenericEntityException {
+ public static GenericValue getContentCache(Delegator delegator, String contentId) throws GenericEntityException {
GenericValue view = null;
List lst = delegator.findByAndCache("ContentDataResourceView", UtilMisc.toMap("contentId", contentId));
@@ -1145,7 +1145,7 @@
return view;
}
- public static GenericValue getCurrentContent(GenericDelegator delegator, List trail, GenericValue userLogin, Map ctx, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GeneralException {
+ public static GenericValue getCurrentContent(Delegator delegator, List trail, GenericValue userLogin, Map ctx, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GeneralException {
String contentId = (String)ctx.get("contentId");
String subContentId = (String)ctx.get("subContentId");
@@ -1208,7 +1208,7 @@
if (view == null) {
return content;
}
- GenericDelegator delegator = view.getDelegator();
+ Delegator delegator = view.getDelegator();
content = delegator.makeValue("Content");
content.setPKFields(view);
content.setNonPKFields(view);
@@ -1222,7 +1222,7 @@
return content;
}
- public static Map buildPickContext(GenericDelegator delegator, String contentAssocTypeId, String assocContentId, String direction, GenericValue thisContent) throws GenericEntityException {
+ public static Map buildPickContext(Delegator delegator, String contentAssocTypeId, String assocContentId, String direction, GenericValue thisContent) throws GenericEntityException {
Map ctx = FastMap.newInstance();
ctx.put("contentAssocTypeId", contentAssocTypeId);
@@ -1254,7 +1254,7 @@
return ctx;
}
- public static void checkConditions(GenericDelegator delegator, Map trailNode, Map contentAssoc, Map whenMap) {
+ public static void checkConditions(Delegator delegator, Map trailNode, Map contentAssoc, Map whenMap) {
Map context = FastMap.newInstance();
GenericValue content = (GenericValue)trailNode.get("value");
@@ -1373,7 +1373,7 @@
return errorMessage;
}
- public static List getContentAssocViewList(GenericDelegator delegator, String contentIdTo, String contentId, String contentAssocTypeId, String statusId, String privilegeEnumId) throws GenericEntityException {
+ public static List getContentAssocViewList(Delegator delegator, String contentIdTo, String contentId, String contentAssocTypeId, String statusId, String privilegeEnumId) throws GenericEntityException {
List exprListAnd = FastList.newInstance();
@@ -1408,7 +1408,7 @@
return filteredList;
}
- public static GenericValue getContentAssocViewFrom(GenericDelegator delegator, String contentIdTo, String contentId, String contentAssocTypeId, String statusId, String privilegeEnumId) throws GenericEntityException {
+ public static GenericValue getContentAssocViewFrom(Delegator delegator, String contentIdTo, String contentId, String contentAssocTypeId, String statusId, String privilegeEnumId) throws GenericEntityException {
List filteredList = getContentAssocViewList(delegator, contentIdTo, contentId, contentAssocTypeId, statusId, privilegeEnumId);
@@ -1464,7 +1464,7 @@
return csv.toString();
}
- public static List csvToList(String csv, GenericDelegator delegator) {
+ public static List csvToList(String csv, Delegator delegator) {
List outList = FastList.newInstance();
List contentIdList = StringUtil.split(csv, ",");
@@ -1490,7 +1490,7 @@
return outList;
}
- public static List csvToContentList(String csv, GenericDelegator delegator) {
+ public static List csvToContentList(String csv, Delegator delegator) {
List trail = FastList.newInstance();
if (csv == null)
@@ -1514,7 +1514,7 @@
return trail;
}
- public static List csvToTrail(String csv, GenericDelegator delegator) {
+ public static List csvToTrail(String csv, Delegator delegator) {
List trail = FastList.newInstance();
if (csv == null)
@@ -1531,7 +1531,7 @@
return trail;
}
- public static String getMimeTypeId(GenericDelegator delegator, GenericValue view, Map ctx) {
+ public static String getMimeTypeId(Delegator delegator, GenericValue view, Map ctx) {
// This order is taken so that the mimeType can be overridden in the transform arguments.
String mimeTypeId = (String)ctx.get("mimeTypeId");
if (UtilValidate.isEmpty(mimeTypeId) && view != null) {
@@ -1564,7 +1564,7 @@
* @param dataResourceId part of primary key of view. To be used if view is null.
* @param parentContentId primary key of parent content. To be used if parentContent is null;
*/
- public static String determineMimeType(GenericDelegator delegator,
+ public static String determineMimeType(Delegator delegator,
GenericValue view, GenericValue parentContent, String contentId,
String dataResourceId, String parentContentId)
throws GenericEntityException {
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java Mon Oct 5 00:08:27 2009
@@ -38,7 +38,7 @@
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.model.ModelEntity;
import org.ofbiz.entity.transaction.GenericTransactionException;
@@ -77,7 +77,7 @@
try {
Locale locale = UtilHttp.getLocale(request);
LocalDispatcher dispatcher = (LocalDispatcher)request.getAttribute("dispatcher");
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue)session.getAttribute("userLogin");
@@ -427,7 +427,7 @@
public static String processContentUpload(Map passedParams, String suffix, HttpServletRequest request) throws GenericServiceException {
LocalDispatcher dispatcher = (LocalDispatcher)request.getAttribute("dispatcher");
- GenericDelegator delegator = (GenericDelegator)request.getAttribute("delegator");
+ Delegator delegator = (Delegator)request.getAttribute("delegator");
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue)session.getAttribute("userLogin");
Map ftlContext = FastMap.newInstance();
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java Mon Oct 5 00:08:27 2009
@@ -36,7 +36,7 @@
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericPK;
import org.ofbiz.entity.GenericValue;
@@ -58,7 +58,7 @@
/** Streams any binary content data to the browser */
public static String serveObjectData(HttpServletRequest request, HttpServletResponse response) {
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
HttpSession session = request.getSession();
@@ -229,7 +229,7 @@
HttpSession session = request.getSession();
ServletContext application = session.getServletContext();
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
Map parameters = UtilHttp.getParameterMap(request);
Debug.log("Img UserAgent - " + request.getHeader("User-Agent"), module);
@@ -309,7 +309,7 @@
public static String persistDataResource(HttpServletRequest request, HttpServletResponse response) {
Map result = null;
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
Map paramMap = UtilHttp.getParameterMap(request);
String dataResourceId = (String)paramMap.get("dataResourceId");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Mon Oct 5 00:08:27 2009
@@ -65,7 +65,7 @@
import org.ofbiz.base.util.template.XslTransform;
import org.ofbiz.common.email.NotificationServices;
import org.ofbiz.content.content.UploadContentAndImage;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.GenericServiceException;
@@ -95,7 +95,7 @@
* @param getAll Indicates that all descendants are to be gotten. Used as "true" to populate an
* indented select list.
*/
- public static String getDataCategoryMap(GenericDelegator delegator, int depth, Map<String, Object> categoryNode, List<String> categoryTypeIds, boolean getAll) throws GenericEntityException {
+ public static String getDataCategoryMap(Delegator delegator, int depth, Map<String, Object> categoryNode, List<String> categoryTypeIds, boolean getAll) throws GenericEntityException {
String errorMsg = null;
String parentCategoryId = (String) categoryNode.get("id");
String currentDataCategoryId = null;
@@ -149,7 +149,7 @@
/**
* Finds the parents of DataCategory entity and puts them in a list, the start entity at the top.
*/
- public static void getDataCategoryAncestry(GenericDelegator delegator, String dataCategoryId, List<String> categoryTypeIds) throws GenericEntityException {
+ public static void getDataCategoryAncestry(Delegator delegator, String dataCategoryId, List<String> categoryTypeIds) throws GenericEntityException {
categoryTypeIds.add(dataCategoryId);
GenericValue dataCategoryValue = delegator.findByPrimaryKey("DataCategory", UtilMisc.toMap("dataCategoryId", dataCategoryId));
if (dataCategoryValue == null)
@@ -188,7 +188,7 @@
*/
// TODO: This method is not used and should be removed. amb
public static String uploadAndStoreImage(HttpServletRequest request, String idField, String uploadField) {
- //GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ //Delegator delegator = (Delegator) request.getAttribute("delegator");
//String idFieldValue = null;
ServletFileUpload fu = new ServletFileUpload(new DiskFileItemFactory(10240, FileUtil.getFile("runtime/tmp")));
@@ -278,7 +278,7 @@
/**
* callDataResourcePermissionCheck Formats data for a call to the checkContentPermission service.
*/
- public static String callDataResourcePermissionCheck(GenericDelegator delegator, LocalDispatcher dispatcher, Map<String, Object> context) {
+ public static String callDataResourcePermissionCheck(Delegator delegator, LocalDispatcher dispatcher, Map<String, Object> context) {
Map<String, Object> permResults = callDataResourcePermissionCheckResult(delegator, dispatcher, context);
String permissionStatus = (String) permResults.get("permissionStatus");
return permissionStatus;
@@ -287,7 +287,7 @@
/**
* callDataResourcePermissionCheck Formats data for a call to the checkContentPermission service.
*/
- public static Map<String, Object> callDataResourcePermissionCheckResult(GenericDelegator delegator, LocalDispatcher dispatcher, Map<String, Object> context) {
+ public static Map<String, Object> callDataResourcePermissionCheckResult(Delegator delegator, LocalDispatcher dispatcher, Map<String, Object> context) {
Map<String, Object> permResults = FastMap.newInstance();
String skipPermissionCheck = (String) context.get("skipPermissionCheck");
@@ -329,7 +329,7 @@
/**
* Gets image data from ImageDataResource and returns it as a byte array.
*/
- public static byte[] acquireImage(GenericDelegator delegator, String dataResourceId) throws GenericEntityException {
+ public static byte[] acquireImage(Delegator delegator, String dataResourceId) throws GenericEntityException {
byte[] b = null;
GenericValue dataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
@@ -340,7 +340,7 @@
return b;
}
- public static byte[] acquireImage(GenericDelegator delegator, GenericValue dataResource) throws GenericEntityException {
+ public static byte[] acquireImage(Delegator delegator, GenericValue dataResource) throws GenericEntityException {
byte[] b = null;
String dataResourceId = dataResource.getString("dataResourceId");
GenericValue imageDataResource = delegator.findByPrimaryKey("ImageDataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
@@ -356,7 +356,7 @@
* @deprecated Use getMimeType(GenericValue) instead
*/
@Deprecated
- public static String getImageType(GenericDelegator delegator, String dataResourceId) throws GenericEntityException {
+ public static String getImageType(Delegator delegator, String dataResourceId) throws GenericEntityException {
GenericValue dataResource = delegator.findByPrimaryKey("DataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
String imageType = getMimeType(dataResource);
return imageType;
@@ -394,7 +394,7 @@
return mimeTypeId;
}
- public static String buildRequestPrefix(GenericDelegator delegator, Locale locale, String webSiteId, String https) {
+ public static String buildRequestPrefix(Delegator delegator, Locale locale, String webSiteId, String https) {
Map<String, Object> prefixValues = FastMap.newInstance();
String prefix;
@@ -456,7 +456,7 @@
}
- public static String getDataResourceMimeType(GenericDelegator delegator, String dataResourceId, GenericValue view) throws GenericEntityException {
+ public static String getDataResourceMimeType(Delegator delegator, String dataResourceId, GenericValue view) throws GenericEntityException {
String mimeType = null;
if (view != null)
@@ -560,14 +560,14 @@
// DataResource rendering methods
// -------------------------------------
- public static String renderDataResourceAsText(GenericDelegator delegator, String dataResourceId, Map<String, Object> templateContext,
+ public static String renderDataResourceAsText(Delegator delegator, String dataResourceId, Map<String, Object> templateContext,
Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
Writer writer = new StringWriter();
renderDataResourceAsText(delegator, dataResourceId, writer, templateContext, locale, targetMimeTypeId, cache);
return writer.toString();
}
- public static void renderDataResourceAsText(GenericDelegator delegator, String dataResourceId, Appendable out,
+ public static void renderDataResourceAsText(Delegator delegator, String dataResourceId, Appendable out,
Map<String, Object> templateContext, Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
if (dataResourceId == null) {
throw new GeneralException("Cannot lookup data resource with for a null dataResourceId");
@@ -731,14 +731,14 @@
// ----------------------------
public static String getDataResourceText(GenericValue dataResource, String mimeTypeId, Locale locale, Map<String, Object> context,
- GenericDelegator delegator, boolean cache) throws IOException, GeneralException {
+ Delegator delegator, boolean cache) throws IOException, GeneralException {
Writer out = new StringWriter();
writeDataResourceText(dataResource, mimeTypeId, locale, context, delegator, out, cache);
return out.toString();
}
public static void writeDataResourceText(GenericValue dataResource, String mimeTypeId, Locale locale, Map<String, Object> templateContext,
- GenericDelegator delegator, Appendable out, boolean cache) throws IOException, GeneralException {
+ Delegator delegator, Appendable out, boolean cache) throws IOException, GeneralException {
Map<String, Object> context = UtilGenerics.checkMap(templateContext.get("context"));
if (context == null) {
context = FastMap.newInstance();
@@ -833,7 +833,7 @@
public static void writeText(GenericValue dataResource, String textData, Map<String, Object> context, String targetMimeTypeId, Locale locale, Appendable out) throws GeneralException, IOException {
String dataResourceMimeTypeId = dataResource.getString("mimeTypeId");
- GenericDelegator delegator = dataResource.getDelegator();
+ Delegator delegator = dataResource.getDelegator();
// assume HTML as data resource data
if (UtilValidate.isEmpty(dataResourceMimeTypeId)) {
@@ -957,7 +957,7 @@
String dataResourceTypeId = dataResource.getString("dataResourceTypeId");
String dataResourceId = dataResource.getString("dataResourceId");
- GenericDelegator delegator = dataResource.getDelegator();
+ Delegator delegator = dataResource.getDelegator();
// first text based data
if (dataResourceTypeId.endsWith("_TEXT") || "LINK".equals(dataResourceTypeId)) {
@@ -1065,7 +1065,7 @@
}
// TODO: remove this method in favor of getDataResourceStream
- public static void streamDataResource(OutputStream os, GenericDelegator delegator, String dataResourceId, String https, String webSiteId, Locale locale, String rootDir) throws IOException, GeneralException {
+ public static void streamDataResource(OutputStream os, Delegator delegator, String dataResourceId, String https, String webSiteId, Locale locale, String rootDir) throws IOException, GeneralException {
try {
GenericValue dataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
if (dataResource == null) {
@@ -1129,19 +1129,19 @@
}
}
- public static ByteBuffer getContentAsByteBuffer(GenericDelegator delegator, String dataResourceId, String https, String webSiteId, Locale locale, String rootDir) throws IOException, GeneralException {
+ public static ByteBuffer getContentAsByteBuffer(Delegator delegator, String dataResourceId, String https, String webSiteId, Locale locale, String rootDir) throws IOException, GeneralException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
streamDataResource(baos, delegator, dataResourceId, https, webSiteId, locale, rootDir);
ByteBuffer byteBuffer = ByteBuffer.wrap(baos.toByteArray());
return byteBuffer;
}
- public String renderDataResourceAsTextExt(GenericDelegator delegator, String dataResourceId, Map<String, Object> templateContext,
+ public String renderDataResourceAsTextExt(Delegator delegator, String dataResourceId, Map<String, Object> templateContext,
Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
return renderDataResourceAsText(delegator, dataResourceId, templateContext, locale, targetMimeTypeId, cache);
}
- public void renderDataResourceAsTextExt(GenericDelegator delegator, String dataResourceId, Appendable out, Map<String, Object> templateContext,
+ public void renderDataResourceAsTextExt(Delegator delegator, String dataResourceId, Appendable out, Map<String, Object> templateContext,
Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, targetMimeTypeId, cache);
}