svn commit: r1343490 - in /ofbiz/trunk/applications/workeffort: src/org/ofbiz/workeffort/content/ src/org/ofbiz/workeffort/workeffort/ webapp/workeffort/calendar/ webapp/workeffort/workeffort/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1343490 - in /ofbiz/trunk/applications/workeffort: src/org/ofbiz/workeffort/content/ src/org/ofbiz/workeffort/workeffort/ webapp/workeffort/calendar/ webapp/workeffort/workeffort/

doogie-3
Author: doogie
Date: Tue May 29 04:14:21 2012
New Revision: 1343490

URL: http://svn.apache.org/viewvc?rev=1343490&view=rev
Log:
DEPRECATION: applications/workeffort: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.

Modified:
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
    ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl
    ofbiz/trunk/applications/workeffort/webapp/workeffort/workeffort/EventReminderEmail.ftl

Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java?rev=1343490&r1=1343489&r2=1343490&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java Tue May 29 04:14:21 2012
@@ -110,7 +110,7 @@ public class WorkEffortContentWrapper im
         if (workEffortContent != null) {
             GenericValue content;
             try {
-                content = workEffortContent.getRelatedOne("Content");
+                content = workEffortContent.getRelatedOne("Content", false);
             } catch (GeneralException e) {
                 Debug.logError(e, module);
                 return null;
@@ -143,7 +143,7 @@ public class WorkEffortContentWrapper im
         if (workEffortContent != null) {
             GenericValue content;
             try {
-                content = workEffortContent.getRelatedOne("Content");
+                content = workEffortContent.getRelatedOne("Content", false);
             } catch (GeneralException e) {
                 Debug.logError(e, module);
                 return null;
@@ -151,7 +151,7 @@ public class WorkEffortContentWrapper im
             if (content != null) {
                 GenericValue dataResource;
                 try {
-                    dataResource = content.getRelatedOne("DataResource");
+                    dataResource = content.getRelatedOne("DataResource", false);
                 } catch (GeneralException e) {
                     Debug.logError(e, module);
                     return null;

Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java?rev=1343490&r1=1343489&r2=1343490&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java Tue May 29 04:14:21 2012
@@ -352,7 +352,7 @@ public class ICalConverter {
                 alarmProps = alarm.getProperties();
                 alarmProps.add(new XProperty(reminderXPropName, reminderId));
             }
-            GenericValue contactMech = reminder.getRelatedOne("ContactMech");
+            GenericValue contactMech = reminder.getRelatedOne("ContactMech", false);
             if (contactMech != null && "EMAIL_ADDRESS".equals(contactMech.get("contactMechTypeId"))) {
                 try {
                     alarmProps.add(new Attendee(contactMech.getString("infoString")));
@@ -571,7 +571,7 @@ public class ICalConverter {
 
     protected static Calendar makeCalendar(GenericValue workEffort, Map<String, Object> context) throws GenericEntityException {
         String iCalData = null;
-        GenericValue iCalValue = workEffort.getRelatedOne("WorkEffortIcalData");
+        GenericValue iCalValue = workEffort.getRelatedOne("WorkEffortIcalData", false);
         if (iCalValue != null) {
             iCalData = iCalValue.getString("icalData");
         }
@@ -763,7 +763,7 @@ public class ICalConverter {
             }
         }
         Map<String, ? extends Object> serviceMap = UtilMisc.toMap("workEffortId", context.get("workEffortId"), "icalData", calendar.toString());
-        GenericValue iCalData = publishProperties.getRelatedOne("WorkEffortIcalData");
+        GenericValue iCalData = publishProperties.getRelatedOne("WorkEffortIcalData", false);
         Map<String, Object> serviceResult = null;
         if (iCalData == null) {
             serviceResult = invokeService("createWorkEffortICalData", serviceMap, context);

Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java?rev=1343490&r1=1343489&r2=1343490&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java Tue May 29 04:14:21 2012
@@ -134,7 +134,7 @@ public class ICalWorker {
         String workEffortId = (String) request.getAttribute("workEffortId");
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         GenericValue publishProperties = delegator.findOne("WorkEffort", UtilMisc.toMap("workEffortId", workEffortId), false);
-        GenericValue iCalData = publishProperties.getRelatedOne("WorkEffortIcalData");
+        GenericValue iCalData = publishProperties.getRelatedOne("WorkEffortIcalData", false);
         if (iCalData != null) {
             return iCalData.getTimestamp("lastUpdatedStamp");
         } else {
@@ -290,11 +290,11 @@ public class ICalWorker {
         request.setAttribute("userLogin", userLogin);
         session.setAttribute("userLogin", userLogin);
         VisitHandler.getVisitor(request, response);
-        GenericValue person = userLogin.getRelatedOne("Person");
+        GenericValue person = userLogin.getRelatedOne("Person", false);
         if (person != null) {
             request.setAttribute("person", person);
         } else {
-            GenericValue partyGroup = userLogin.getRelatedOne("PartyGroup");
+            GenericValue partyGroup = userLogin.getRelatedOne("PartyGroup", false);
             if (partyGroup != null) {
                 request.setAttribute("partyGroup", partyGroup);
             }

Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=1343490&r1=1343489&r2=1343490&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Tue May 29 04:14:21 2012
@@ -921,7 +921,7 @@ public class WorkEffortServices {
             int currentCount = reminder.get("currentCount") == null ? 0 : reminder.getLong("currentCount").intValue();
             GenericValue workEffort = null;
             try {
-                workEffort = reminder.getRelatedOne("WorkEffort");
+                workEffort = reminder.getRelatedOne("WorkEffort", false);
             } catch (GenericEntityException e) {
                 Debug.logWarning("Error while getting work effort: " + e, module);
             }
@@ -1041,7 +1041,7 @@ public class WorkEffortServices {
         GenericValue reminder = (GenericValue) context.get("reminder");
         GenericValue contactMech = null;
         try {
-            contactMech = reminder.getRelatedOne("ContactMech");
+            contactMech = reminder.getRelatedOne("ContactMech", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
@@ -1083,7 +1083,7 @@ public class WorkEffortServices {
     @Deprecated
     protected static void processEventReminder(DispatchContext ctx, GenericValue reminder, Map<String, Object> parameters) throws GenericEntityException {
         LocalDispatcher dispatcher = ctx.getDispatcher();
-        GenericValue contactMech = reminder.getRelatedOne("ContactMech");
+        GenericValue contactMech = reminder.getRelatedOne("ContactMech", false);
         if (contactMech != null && "EMAIL_ADDRESS".equals(contactMech.get("contactMechTypeId"))) {
             String screenLocation = UtilProperties.getPropertyValue("EventReminders", "eventReminders.emailScreenWidgetLocation");
             String fromAddress = UtilProperties.getPropertyValue("EventReminders", "eventReminders.emailFromAddress");

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl?rev=1343490&r1=1343489&r2=1343490&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/calendar/upcoming.ftl Tue May 29 04:14:21 2012
@@ -35,7 +35,7 @@ under the License.
             <tr<#if alt_row> class="alternate-row"</#if>>
               <td><#if workEffort.actualStartDate?exists>${workEffort.actualStartDate}<#else>${workEffort.estimatedStartDate}</#if></td>
               <td><#if workEffort.actualCompletionDate?exists>${workEffort.actualCompletionDate}<#else>${workEffort.estimatedCompletionDate}</#if></td>
-              <td>${workEffort.getRelatedOne("WorkEffortType").get("description",locale)}</td>
+              <td>${workEffort.getRelatedOne("WorkEffortType", false).get("description",locale)}</td>
               <td class="button-col"><a href="<@ofbizUrl>EditWorkEffort?workEffortId=${workEffort.workEffortId}${addlParam?if_exists}</@ofbizUrl>">${workEffort.workEffortName}</a></td>
             </tr>
             <#assign alt_row = !alt_row>

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/workeffort/EventReminderEmail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/workeffort/EventReminderEmail.ftl?rev=1343490&r1=1343489&r2=1343490&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/workeffort/EventReminderEmail.ftl (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/workeffort/EventReminderEmail.ftl Tue May 29 04:14:21 2012
@@ -64,11 +64,11 @@ under the License.
           <#list partyAssignments as wepa>
             <tr>
               <td>${wepa.groupName?if_exists}${wepa.firstName?if_exists} ${wepa.lastName?if_exists}</td>
-              <td>${(wepa.getRelatedOne("RoleType").description)?default("&nbsp;")}</td>
+              <td>${(wepa.getRelatedOne("RoleType", false).description)?default("&nbsp;")}</td>
               <td>${wepa.fromDate?default("&nbsp;")}</td>
               <td>${wepa.thruDate?default("&nbsp;")}</td>
-              <td>${(wepa.getRelatedOne("AssignmentStatusItem").description)?default("&nbsp;")}</td>
-              <td>${(wepa.getRelatedOne("DelegateReasonEnumeration").description)?default("&nbsp;")}</td>
+              <td>${(wepa.getRelatedOne("AssignmentStatusItem", false).description)?default("&nbsp;")}</td>
+              <td>${(wepa.getRelatedOne("DelegateReasonEnumeration", false).description)?default("&nbsp;")}</td>
             </tr>
           </#list>
         </tbody>
@@ -92,8 +92,8 @@ under the License.
               <td>${wefa.fixedAssetName?default("&nbsp;")}</td>
               <td>${wefa.fromDate?default("&nbsp;")}</td>
               <td>${wefa.thruDate?default("&nbsp;")}</td>
-              <td>${(wefa.getRelatedOne("StatusItem").description)?default("&nbsp;")}</td>
-              <td>${(wefa.getRelatedOne("AvailabilityStatusItem").description)?default("&nbsp;")}</td>
+              <td>${(wefa.getRelatedOne("StatusItem", false).description)?default("&nbsp;")}</td>
+              <td>${(wefa.getRelatedOne("AvailabilityStatusItem", false).description)?default("&nbsp;")}</td>
               <td>${wefa.allocatedCost?default("&nbsp;")}</td>
               <td>${wefa.comments?default("&nbsp;")}</td>
             </tr>