Skip to content

Commit

Permalink
No functionnal change, correct debug log origin. Replace null string …
Browse files Browse the repository at this point in the history
…by module to display the class and log file and found where the log came from

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1681125 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed May 22, 2015
1 parent 2b86ef8 commit 4ddee5c
Showing 1 changed file with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static Map<String, Object> persistContentAndAssoc(DispatchContext dctx, M
String deactivateString = (String) context.get("deactivateExisting");
boolean deactivateExisting = "true".equalsIgnoreCase(deactivateString);

if (Debug.infoOn()) Debug.logInfo("in persist... mapKey(0):" + mapKey, null);
if (Debug.infoOn()) Debug.logInfo("in persist... mapKey(0):" + mapKey, module);

// ContentPurposes can get passed in as a delimited string or a list. Combine.
List<String> contentPurposeList = UtilGenerics.checkList(context.get("contentPurposeList"));
Expand All @@ -170,12 +170,12 @@ public static Map<String, Object> persistContentAndAssoc(DispatchContext dctx, M
}
if (contentPurposeList != null) {
context.put("contentPurposeList", contentPurposeList);
context.put("contentPurposeString", null);
context.put("contentPurposeString", module);
}

if (Debug.infoOn()) {
Debug.logInfo("in persist... contentPurposeList(0):" + contentPurposeList, null);
Debug.logInfo("in persist... textData(0):" + context.get("textData"), null);
Debug.logInfo("in persist... contentPurposeList(0):" + contentPurposeList, module);
Debug.logInfo("in persist... textData(0):" + context.get("textData"), module);
}

GenericValue content = delegator.makeValue("Content");
Expand All @@ -188,7 +188,7 @@ public static Map<String, Object> persistContentAndAssoc(DispatchContext dctx, M
String origDataResourceId = (String) content.get("dataResourceId");

if (Debug.infoOn()) {
Debug.logInfo("in persist... contentId(0):" + contentId, null);
Debug.logInfo("in persist... contentId(0):" + contentId, module);
}

GenericValue dataResource = delegator.makeValue("DataResource");
Expand All @@ -203,7 +203,7 @@ public static Map<String, Object> persistContentAndAssoc(DispatchContext dctx, M
String dataResourceId = (String) dataResource.get("dataResourceId");
String dataResourceTypeId = (String) dataResource.get("dataResourceTypeId");
if (Debug.infoOn()) {
Debug.logInfo("in persist... dataResourceId(0):" + dataResourceId, null);
Debug.logInfo("in persist... dataResourceId(0):" + dataResourceId, module);
}

GenericValue contentAssoc = delegator.makeValue("ContentAssoc");
Expand Down Expand Up @@ -251,7 +251,7 @@ public static Map<String, Object> persistContentAndAssoc(DispatchContext dctx, M

boolean dataResourceExists = true;
if (Debug.infoOn()) {
Debug.logInfo("in persist... dataResourceTypeId(0):" + dataResourceTypeId, null);
Debug.logInfo("in persist... dataResourceTypeId(0):" + dataResourceTypeId, module);
}
if (UtilValidate.isNotEmpty(dataResourceTypeId)) {
Map<String, Object> dataResourceResult = new HashMap<String, Object>();
Expand Down Expand Up @@ -283,7 +283,7 @@ public static Map<String, Object> persistContentAndAssoc(DispatchContext dctx, M
context.put("skipPermissionCheck", null); // Force check here
boolean contentExists = true;
if (Debug.infoOn()) {
Debug.logInfo("in persist... contentTypeId:" + contentTypeId + " dataResourceTypeId:" + dataResourceTypeId + " contentId:" + contentId + " dataResourceId:" + dataResourceId, null);
Debug.logInfo("in persist... contentTypeId:" + contentTypeId + " dataResourceTypeId:" + dataResourceTypeId + " contentId:" + contentId + " dataResourceId:" + dataResourceId, module);
}
if (UtilValidate.isNotEmpty(contentTypeId)) {
if (UtilValidate.isEmpty(contentId)) {
Expand Down Expand Up @@ -366,13 +366,12 @@ public static Map<String, Object> persistContentAndAssoc(DispatchContext dctx, M

// If parentContentIdTo or parentContentIdFrom exists, create association with newly created content
if (Debug.infoOn()) {
Debug.logInfo("CREATING contentASSOC contentAssocTypeId:" + contentAssocTypeId, null);
Debug.logInfo("CREATING contentASSOC contentAssocTypeId:" + contentAssocTypeId, module);
}
// create content assoc if the key values are present....
Debug.logInfo("contentAssoc: " + contentAssoc.toString(), null);
if (Debug.infoOn()) Debug.logInfo("contentAssoc: " + contentAssoc.toString(), module);
if (UtilValidate.isNotEmpty(contentAssocTypeId) && contentAssoc.get("contentId") != null && contentAssoc.get("contentIdTo") != null) {
if (Debug.infoOn())
Debug.logInfo("in persistContentAndAssoc, deactivateExisting:" + deactivateExisting, null);
if (Debug.infoOn()) Debug.logInfo("in persistContentAndAssoc, deactivateExisting:" + deactivateExisting, module);
Map<String, Object> contentAssocContext = new HashMap<String, Object>();
contentAssocContext.put("userLogin", userLogin);
contentAssocContext.put("displayFailCond", bDisplayFailCond);
Expand Down Expand Up @@ -602,7 +601,7 @@ public static Map<String, Object> persistDataResourceAndDataMethod(DispatchConte
String dataResourceId = (String)dataResource.get("dataResourceId");
String dataResourceTypeId = (String)dataResource.get("dataResourceTypeId");
if (Debug.infoOn()) {
Debug.logInfo("in persist... dataResourceId(0):" + dataResourceId, null);
Debug.logInfo("in persist... dataResourceId(0):" + dataResourceId, module);
}
context.put("skipPermissionCheck", "granted"); // TODO: a temp hack because I don't want to bother with DataResource permissions at this time.
boolean dataResourceExists = true;
Expand Down Expand Up @@ -644,7 +643,7 @@ public static Map<String, Object> persistDataResourceAndDataMethod(DispatchConte
}
dataResourceId = (String)thisResult.get("dataResourceId");
if (Debug.infoOn()) {
Debug.logInfo("in persist... dataResourceId(0):" + dataResourceId, null);
Debug.logInfo("in persist... dataResourceId(0):" + dataResourceId, module);
}
dataResource = (GenericValue)thisResult.get("dataResource");
Map<String, Object> fileContext = new HashMap<String, Object>();
Expand Down

0 comments on commit 4ddee5c

Please sign in to comment.