Author: doogie
Date: Fri Mar 27 17:01:52 2009 New Revision: 759256 URL: http://svn.apache.org/viewvc?rev=759256&view=rev Log: Fix lines that *only* have whitespace. Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortPartyAssignmentServices.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java 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=759256&r1=759255&r2=759256&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 Fri Mar 27 17:01:52 2009 @@ -51,7 +51,7 @@ public static final String module = WorkEffortContentWrapper.class.getName(); public static final String CACHE_KEY_SEPARATOR = "::"; - + public static UtilCache<String, String> workEffortContentCache = new UtilCache<String, String>("workeffort.content.rendered", true); protected LocalDispatcher dispatcher; @@ -164,7 +164,7 @@ return null; } - + public List<String> getList(String contentTypeId) { try { return getWorkEffortContentTextList(workEffort, contentTypeId, locale, mimeTypeId, workEffort.getDelegator(), dispatcher); @@ -343,7 +343,7 @@ if (delegator == null) { throw new IllegalArgumentException("GenericDelegator missing"); } - + List<GenericValue> workEffortContentList = null; try { workEffortContentList = delegator.findByAndCache("WorkEffortContent", UtilMisc.toMap("workEffortId", workEffortId, "workEffortContentTypeId", workEffortContentTypeId), UtilMisc.toList("-fromDate")); Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java?rev=759256&r1=759255&r2=759256&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java Fri Mar 27 17:01:52 2009 @@ -39,7 +39,7 @@ * WorkEffortWorker - Worker class to reduce code in JSPs & make it more reusable */ public class ProjectWorker { - + public static final String module = ProjectWorker.class.getName(); /** @deprecated */ Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java?rev=759256&r1=759255&r2=759256&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java Fri Mar 27 17:01:52 2009 @@ -79,13 +79,13 @@ // ----- TemporalExpressionVisitor Implementation ----- // public void visit(Null expr) {} - + public void visit(Union expr) { for (TemporalExpression childExpr : expr.getExpressionSet()) { childExpr.accept(this); } } - + public void visit(Intersection expr) { this.stateStack.push(this.state); VisitorState newState = new VisitorState(); @@ -118,7 +118,7 @@ this.state.exRecurList.addAll(newState.exRecurList); } } - + public void visit(TemporalExpressions.DateRange expr) { if (this.state.isExcluded) { throw new IllegalStateException("iCalendar does not support excluded date ranges"); @@ -128,7 +128,7 @@ periodList.add(new Period(new DateTime(range.start()), new DateTime(range.end()))); this.incDateList.add(new RDate(periodList)); } - + @SuppressWarnings("unchecked") public void visit(TimeOfDayRange expr) { // TODO: this needs a better conversion @@ -147,7 +147,7 @@ recur.getHourList().addAll(hourList); this.state.addRecur(recur); } - + @SuppressWarnings("unchecked") public void visit(TemporalExpressions.DayOfWeekRange expr) { int startDay = expr.getStartDay(); @@ -165,7 +165,7 @@ recur.getDayList().addAll(dayList); this.state.addRecur(recur); } - + @SuppressWarnings("unchecked") public void visit(TemporalExpressions.MonthRange expr) { int startMonth = expr.getStartMonth(); @@ -185,7 +185,7 @@ recur.getMonthList().addAll(monthList); this.state.addRecur(recur); } - + @SuppressWarnings("unchecked") public void visit(TemporalExpressions.DayOfMonthRange expr) { int startDay = expr.getStartDay(); @@ -200,13 +200,13 @@ recur.getMonthDayList().addAll(dayList); this.state.addRecur(recur); } - + public void visit(TemporalExpressions.DayInMonth expr) { Recur recur = new Recur(Recur.MONTHLY, 0); recur.getDayList().add(new WeekDay(dayOfWeekArray[expr.getDayOfWeek() - 1], expr.getOccurrence())); this.state.addRecur(recur); } - + public void visit(TemporalExpressions.Frequency expr) { if (this.dateStart == null) { this.dateStart = new DtStart(new net.fortuna.ical4j.model.Date(expr.getStartDate())); @@ -228,7 +228,7 @@ this.state.addRecur((new Recur(Recur.YEARLY, freqCount))); } } - + @SuppressWarnings("unchecked") protected Recur consolidateRecurs(List<Recur> recurList) { // Try to consolidate a list of Recur instances into one instance @@ -268,7 +268,7 @@ newRecur.getHourList().addAll(hourList); return newRecur; } - + protected class VisitorState { public boolean isExcluded = false; public boolean isIntersection = false; Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java?rev=759256&r1=759255&r2=759256&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java Fri Mar 27 17:01:52 2009 @@ -45,7 +45,7 @@ public static final String module = WorkEffortKeywordIndex.class.getName(); public static void indexKeywords(GenericValue workEffort) throws GenericEntityException { if (workEffort == null) return; - + GenericDelegator delegator = workEffort.getDelegator(); if (delegator == null) return; String workEffortId = workEffort.getString("workEffortId"); @@ -54,7 +54,7 @@ String stopWordBagAnd = KeywordSearchUtil.getStopWordBagAnd(); boolean removeStems = KeywordSearchUtil.getRemoveStems(); Set<String> stemSet = KeywordSearchUtil.getStemSet(); - + Map<String, Long> keywords = new TreeMap<String, Long>(); List<String> strings = FastList.newInstance(); int widWeight = 1; @@ -64,11 +64,11 @@ Debug.logWarning("Could not parse weight number: " + e.toString(), module); } keywords.put(workEffort.getString("workEffortId").toLowerCase(), Long.valueOf(widWeight)); - + addWeightedKeywordSourceString(workEffort, "workEffortName", strings); addWeightedKeywordSourceString(workEffort, "workEffortTypeId", strings); addWeightedKeywordSourceString(workEffort, "currentStatusId", strings); - + if (!"0".equals(UtilProperties.getPropertyValue("workeffortsearch", "index.weight.WorkEffortNoteAndData.noteInfo", "1"))) { Iterator workEffortNotes = UtilMisc.toIterator(delegator.findByAnd("WorkEffortNoteAndData", UtilMisc.toMap("workEffortId", workEffortId))); while (workEffortNotes != null && workEffortNotes.hasNext()) { @@ -86,7 +86,7 @@ addWeightedKeywordSourceString(workEffortAttribute, "attrValue", strings); } } - + String workEffortContentTypes = UtilProperties.getPropertyValue("workeffortsearch", "index.include.WorkEffortContentTypes"); for (String workEffortContentTypeId: workEffortContentTypes.split(",")) { int weight = 1; @@ -95,7 +95,7 @@ } catch (Exception e) { Debug.logWarning("Could not parse weight number: " + e.toString(), module); } - + List<GenericValue> workEffortContentAndInfos = delegator.findByAnd("WorkEffortContentAndInfo", UtilMisc.toMap("workEffortId", workEffortId, "workEffortContentTypeId", workEffortContentTypeId), null); for (GenericValue workEffortContentAndInfo: workEffortContentAndInfos) { addWeightedDataResourceString(workEffortContentAndInfo, weight, strings, delegator, workEffort); @@ -120,7 +120,7 @@ if (Debug.verboseOn()) Debug.logVerbose("WorkEffortKeywordIndex indexKeywords Storing " + toBeStored.size() + " keywords for workEffortId " + workEffort.getString("workEffortId"), module); delegator.storeAll(toBeStored); } - + } public static void addWeightedDataResourceString(GenericValue dataResource, int weight, List<String> strings, GenericDelegator delegator, GenericValue workEffort) { Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortPartyAssignmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortPartyAssignmentServices.java?rev=759256&r1=759255&r2=759256&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortPartyAssignmentServices.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortPartyAssignmentServices.java Fri Mar 27 17:01:52 2009 @@ -34,7 +34,7 @@ * WorkEffortPartyAssignmentServices - Services to handle form input and other data changes. */ public class WorkEffortPartyAssignmentServices { - + public static final String module = WorkEffortPartyAssignmentServices.class.getName(); public static void updateWorkflowEngine(GenericValue wepa, GenericValue userLogin, LocalDispatcher dispatcher) { Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java?rev=759256&r1=759255&r2=759256&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java Fri Mar 27 17:01:52 2009 @@ -116,7 +116,7 @@ getAllSubWorkEffortIds(subWorkEffortId, workEffortIdSet, delegator, nowTimestamp); } } - + // Find WorkEffort where current workEffortId = workEffortParentId; only select minimal fields to keep the size low List<GenericValue> childWorkEffortList = delegator.findList("WorkEffort", EntityCondition.makeCondition("workEffortParentId", EntityComparisonOperator.EQUALS, workEffortId), UtilMisc.toSet("workEffortId", "workEffortParentId"), null, null, true); @@ -201,7 +201,7 @@ Debug.logError(e, "Error closing WorkEffortSearch EntityListIterator"); } } - + long endMillis = System.currentTimeMillis(); double totalSeconds = ((double)endMillis - (double)startMillis)/1000.0; @@ -307,9 +307,9 @@ } dynamicViewEntity.addAlias("WEFF", "workEffortId", null, null, null, Boolean.valueOf(workEffortIdGroupBy), null); EntityCondition whereCondition = EntityCondition.makeCondition(entityConditionList, EntityOperator.AND); - + // Debug.logInfo("WorkEffortSearch, whereCondition = " + whereCondition.toString(), module); - + EntityFindOptions efo = new EntityFindOptions(); efo.setDistinct(true); efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE); @@ -335,7 +335,7 @@ try { boolean hasResults = false; Object initialResult = null; - + /* this method has been replaced by the following to address issue with SAP DB and possibly other DBs if (resultOffset != null) { Debug.logInfo("Before relative, current index=" + eli.currentIndex(), module); @@ -357,7 +357,7 @@ hasResults = eli.relative(resultOffset.intValue() - 1); initialResult = null; } - + // get the first as the current one GenericValue searchResult = null; if (hasResults) { @@ -378,13 +378,13 @@ return workEffortIds; } - + // init numRetreived to one since we have already grabbed the initial one int numRetreived = 1; int duplicatesFound = 0; Set<String> workEffortIdSet = FastSet.newInstance(); - + workEffortIds.add(searchResult.getString("workEffortId")); workEffortIdSet.add(searchResult.getString("workEffortId")); @@ -397,7 +397,7 @@ } else { duplicatesFound++; } - + /* StringBuilder lineMsg = new StringBuilder("Got search result line: "); Iterator<String> fieldsToSelectIter = fieldsToSelect.iterator(); @@ -492,8 +492,8 @@ /** pretty print for log messages and even UI stuff */ public abstract String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale); } - - + + public static class WorkEffortAssocConstraint extends WorkEffortSearchConstraint { public static final String constraintName = "WorkEffortAssoc"; protected String workEffortId; @@ -516,7 +516,7 @@ } // allow assoc from or to the current WE and the workEffortId on this constraint - + // make index based values and increment String entityAlias; String prefix; @@ -533,7 +533,7 @@ workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("workEffortId","workEffortIdFrom")); - + List<EntityExpr> assocConditionFromTo = FastList.newInstance(); assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "WorkEffortIdTo", EntityOperator.IN, workEffortIdSet)); if (UtilValidate.isNotEmpty(workEffortAssocTypeId)) { @@ -554,7 +554,7 @@ workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("workEffortId","workEffortIdTo")); - + List<EntityExpr> assocConditionToFrom = FastList.newInstance(); assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "WorkEffortIdFrom", EntityOperator.IN, workEffortIdSet)); if (UtilValidate.isNotEmpty(workEffortAssocTypeId)) { @@ -565,13 +565,13 @@ // now create and add the combined constraint workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(assocConditionFromTo, EntityOperator.AND), EntityOperator.OR, EntityCondition.makeCondition(assocConditionToFrom, EntityOperator.AND))); - - + + // add in workEffortSearchConstraint, don't worry about the workEffortSearchResultId or constraintSeqId, those will be fill in later workEffortSearchContext.workEffortSearchConstraintList.add(workEffortSearchContext.getDelegator().makeValue("WorkEffortSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", this.workEffortId + "," + this.workEffortAssocTypeId, "includeSubWorkEfforts", this.includeSubWorkEfforts ? "Y" : "N"))); } - + /** pretty print for log messages and even UI stuff */ public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { GenericValue workEffort = null; @@ -643,11 +643,11 @@ public static class WorkEffortReviewConstraint extends WorkEffortSearchConstraint { public static final String constraintName = "WorkEffortReview"; protected String reviewTextString; - + public WorkEffortReviewConstraint(String reviewTextString) { this.reviewTextString = reviewTextString; } - + public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { String entityAlias = "WFR" + workEffortSearchContext.index; String prefix = "wfr" + workEffortSearchContext.index; @@ -661,7 +661,7 @@ workEffortSearchContext.workEffortSearchConstraintList.add(workEffortSearchContext.getDelegator().makeValue("WorkEffortSearchConstraint", valueMap)); } - + /** pretty print for log messages and even UI stuff */ public String prettyPrintConstraint(GenericDelegator delegator, boolean detailed, Locale locale) { StringBuilder ppBuf = new StringBuilder(); @@ -689,7 +689,7 @@ } } } - + public static class PartyAssignmentConstraint extends WorkEffortSearchConstraint { public static final String constraintName = "PartyAssignment"; protected String partyId; @@ -712,7 +712,7 @@ workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId")); - + workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "PartyId", EntityOperator.EQUALS, partyId)); workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp))); workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp)); @@ -755,7 +755,7 @@ ppBuf.append(this.partyId); ppBuf.append("] "); } - + if (roleType != null) { ppBuf.append(roleType.getString("description")); } else { @@ -816,7 +816,7 @@ workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "FromDate", "fromDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId")); - + workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductId", EntityOperator.IN, productIdSet)); workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp))); workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp)); @@ -831,7 +831,7 @@ productIdInfo.append(","); } } - + workEffortSearchContext.workEffortSearchConstraintList.add(workEffortSearchContext.getDelegator().makeValue("WorkEffortSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString", productIdInfo.toString()))); } @@ -849,7 +849,7 @@ } else { infoOut.append(product.getString("productName")); } - + if (productIdIter.hasNext()) { infoOut.append(", "); } @@ -857,7 +857,7 @@ } catch (GenericEntityException e) { Debug.logError(e, "Error finding ProductSetConstraint information for constraint pretty print", module); } - + return infoOut.toString(); } @@ -1010,7 +1010,7 @@ public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { workEffortSearchContext.dynamicViewEntity.addAlias("WEFF", "lastModifiedDate", "lastModifiedDate", null, null, null, null); - + EntityConditionList<EntityExpr> dateConditions = null; EntityExpr dateCondition=null; if (fromDate !=null && thruDate!=null) { @@ -1034,9 +1034,9 @@ EntityCondition.makeCondition("lastModifiedDate", EntityOperator.EQUALS, null)), EntityOperator.OR); } - + workEffortSearchContext.entityConditionList.add(conditions); - + // add in workEffortSearchConstraint, don't worry about the workEffortSearchResultId or constraintSeqId, those will be fill in later workEffortSearchContext.workEffortSearchConstraintList.add(workEffortSearchContext.getDelegator().makeValue("WorkEffortSearchConstraint", UtilMisc.toMap("constraintName", constraintName, "infoString","fromDate : " + fromDate + " thruDate : " + thruDate))); } @@ -1048,7 +1048,7 @@ ppBuf.append(fromDate).append("-").append(thruDate).append("\", ").append(UtilProperties.getMessage(resource, "WorkEffortLastModified", locale)).append(" "); return ppBuf.toString(); } - + public boolean equals(Object obj) { WorkEffortSearchConstraint psc = (WorkEffortSearchConstraint) obj; Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java?rev=759256&r1=759255&r2=759256&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java Fri Mar 27 17:01:52 2009 @@ -39,7 +39,7 @@ public class WorkEffortSearchEvents { public static final String module = WorkEffortSearchEvents.class.getName(); - + public static Map getWorkEffortSearchResult(HttpServletRequest request, GenericDelegator delegator) { // ========== Create View Indexes @@ -51,7 +51,7 @@ HttpSession session = request.getSession(); WorkEffortSearchOptions workEffortSearchOptions = WorkEffortSearchSession.getWorkEffortSearchOptions(session); - + Integer viewIndexInteger = workEffortSearchOptions.getViewIndex(); if (viewIndexInteger != null) viewIndex = viewIndexInteger.intValue(); Integer viewSizeInteger = workEffortSearchOptions.getViewSize(); @@ -77,7 +77,7 @@ WorkEffortSearchContext workEffortSearchContext = new WorkEffortSearchContext(delegator, visitId); workEffortSearchContext.addWorkEffortSearchConstraints(workEffortSearchConstraintList); - + workEffortSearchContext.setResultSortOrder(resultSortOrder); workEffortSearchContext.setResultOffset(resultOffset); workEffortSearchContext.setMaxResults(maxResults); @@ -112,6 +112,6 @@ return result; } - - + + } Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java?rev=759256&r1=759255&r2=759256&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java Fri Mar 27 17:01:52 2009 @@ -92,13 +92,13 @@ workEffortSearchOptions.resultSortOrder = resultSortOrder; workEffortSearchOptions.changed = true; } - + public static void clearSearchOptions(HttpSession session) { WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session); workEffortSearchOptions.constraintList = null; workEffortSearchOptions.resultSortOrder = null; } - + public void clearViewInfo() { this.viewIndex = null; this.viewSize = null; @@ -128,7 +128,7 @@ public void setViewSize(Integer viewSize) { this.viewSize = viewSize; } - + public List<String> searchGetConstraintStrings(boolean detailed, GenericDelegator delegator, Locale locale) { List<WorkEffortSearchConstraint> workEffortSearchConstraintList = this.getConstraintList(); List<String> constraintStrings = FastList.newInstance(); @@ -147,7 +147,7 @@ return constraintStrings; } } - + public static WorkEffortSearchOptions getWorkEffortSearchOptions(HttpSession session) { WorkEffortSearchOptions workEffortSearchOptions = (WorkEffortSearchOptions) session.getAttribute("_WORK_EFFORT_SEARCH_OPTIONS_CURRENT_"); if (workEffortSearchOptions == null) { @@ -156,7 +156,7 @@ } return workEffortSearchOptions; } - + public static void processSearchParameters(Map<String, Object> parameters, HttpServletRequest request) { Boolean alreadyRun = (Boolean) request.getAttribute("processSearchParametersAlreadyRun"); if (Boolean.TRUE.equals(alreadyRun)) { @@ -166,7 +166,7 @@ } HttpSession session = request.getSession(); boolean constraintsChanged = false; - + // clear search? by default yes, but if the clearSearch parameter is N then don't String clearSearchString = (String) parameters.get("clearSearch"); if (!"N".equals(clearSearchString)) { @@ -205,7 +205,7 @@ searchAddConstraint(new WorkEffortSearch.PartyAssignmentConstraint(partyId,roleTypeId), session); constraintsChanged = true; } - + // add a Product Set to the search if (UtilValidate.isNotEmpty((String) parameters.get("productId_1"))) { List<String> productSet = FastList.newInstance(); @@ -223,7 +223,7 @@ if (UtilValidate.isNotEmpty((String) parameters.get("fromDate"))) { fromDate=Timestamp.valueOf((String) parameters.get("fromDate")); } - + Timestamp thruDate = null; if (UtilValidate.isNotEmpty((String) parameters.get("thruDate"))) { thruDate = Timestamp.valueOf((String) parameters.get("thruDate")); @@ -231,7 +231,7 @@ searchAddConstraint(new WorkEffortSearch.LastUpdatedRangeConstraint(fromDate,thruDate), session); constraintsChanged = true; } - + // if keywords were specified, add a constraint for them if (UtilValidate.isNotEmpty((String) parameters.get("SEARCH_STRING"))) { String keywordString = (String) parameters.get("SEARCH_STRING"); @@ -253,7 +253,7 @@ searchSetSortOrder(new WorkEffortSearch.SortWorkEffortField(fieldName, ascending), session); } } - + WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session); if (constraintsChanged) { // query changed, clear out the VIEW_INDEX & VIEW_SIZE @@ -281,7 +281,7 @@ } } } - + public static void searchAddConstraint(WorkEffortSearchConstraint workEffortSearchConstraint, HttpSession session) { WorkEffortSearchOptions.addConstraint(workEffortSearchConstraint, session); } @@ -296,7 +296,7 @@ } return optionsHistoryList; } - + public static List<String> searchGetConstraintStrings(boolean detailed, HttpSession session, GenericDelegator delegator) { Locale locale = UtilHttp.getLocale(session); WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session); 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=759256&r1=759255&r2=759256&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 Fri Mar 27 17:01:52 2009 @@ -61,7 +61,7 @@ * WorkEffortServices - WorkEffort related Services */ public class WorkEffortServices { - + public static final String module = WorkEffortServices.class.getName(); public static Map<String, Object> getWorkEffortAssignedEventsForRole(DispatchContext ctx, Map<String, ? extends Object> context) { @@ -99,13 +99,13 @@ result.put("events", validWorkEfforts); return result; } - + public static Map<String, Object> getWorkEffortAssignedEventsForRoleOfAllParties(DispatchContext ctx, Map<String, ? extends Object> context) { GenericDelegator delegator = ctx.getDelegator(); String roleTypeId = (String) context.get("roleTypeId"); List validWorkEfforts = null; - + try { List<EntityExpr> conditionList = FastList.newInstance(); conditionList.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, roleTypeId)); @@ -114,7 +114,7 @@ conditionList.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "CAL_DELEGATED")); conditionList.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "CAL_COMPLETED")); conditionList.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "CAL_CANCELLED")); - + EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(conditionList, EntityOperator.AND); validWorkEfforts = EntityUtil.filterByDate( delegator.findList("WorkEffortAndPartyAssign", ecl, null, UtilMisc.toList("estimatedStartDate", "priority"), null, false) @@ -262,7 +262,7 @@ constraints.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "WF_COMPLETED")); constraints.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "WF_TERMINATED")); constraints.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "WF_ABORTED")); - + EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(constraints); groupWorkEfforts = EntityUtil.filterByDate( delegator.findList("WorkEffortPartyAssignByGroup", ecl, null, UtilMisc.toList("priority"), null, false) @@ -278,33 +278,33 @@ result.put("groupActivities", groupWorkEfforts); return result; } - + public static Map<String, Object> getWorkEffort(DispatchContext ctx, Map<String, ? extends Object> context) { GenericDelegator delegator = ctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Security security = ctx.getSecurity(); Map<String, Object> resultMap = FastMap.newInstance(); - + String workEffortId = (String) context.get("workEffortId"); GenericValue workEffort = null; - + try { workEffort = delegator.findOne("WorkEffort", false, "workEffortId", workEffortId); } catch (GenericEntityException e) { Debug.logWarning(e, module); } - + Boolean canView = null; Collection workEffortPartyAssignments = null; Boolean tryEntity = null; GenericValue currentStatus = null; - + if (workEffort == null) { tryEntity = Boolean.FALSE; canView = Boolean.TRUE; - + String statusId = (String) context.get("currentStatusId"); - + if (statusId != null && statusId.length() > 0) { try { currentStatus = delegator.findByPrimaryKeyCache("StatusItem", UtilMisc.toMap("statusId", statusId)); @@ -325,9 +325,9 @@ if (!canView.booleanValue() && security.hasEntityPermission("WORKEFFORTMGR", "_VIEW", userLogin)) { canView = Boolean.TRUE; } - + tryEntity = Boolean.TRUE; - + if (workEffort.get("currentStatusId") != null) { try { currentStatus = delegator.findByPrimaryKeyCache("StatusItem", UtilMisc.toMap("statusId", workEffort.get("currentStatusId"))); @@ -336,7 +336,7 @@ } } } - + if (workEffortId != null) resultMap.put("workEffortId", workEffortId); if (workEffort != null) resultMap.put("workEffort", workEffort); if (canView != null) resultMap.put("canView", canView); @@ -345,7 +345,7 @@ if (currentStatus != null) resultMap.put("currentStatusItem", currentStatus); return resultMap; } - + private static List<EntityCondition> getDefaultWorkEffortExprList(Collection<String> partyIds, String facilityId, String fixedAssetId, String workEffortTypeId) { List<EntityCondition> entityExprList = UtilMisc.<EntityCondition>toList(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "CAL_CANCELLED"), EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "PRUN_CANCELLED")); List<EntityExpr> typesList = FastList.newInstance(); @@ -596,12 +596,12 @@ result.put("maxConcurrentEntries", Integer.valueOf(maxConcurrentEntries)); return result; } - + public static Map<String, Object> getProductManufacturingSummaryByFacility(DispatchContext ctx, Map<String, ? extends Object> context) { GenericDelegator delegator = ctx.getDelegator(); String productId = (String) context.get("productId"); String facilityId = (String) context.get("facilityId"); // optional - + Map<String, Map<String, Object>> summaryInByFacility = FastMap.newInstance(); Map<String, Map<String, Object>> summaryOutByFacility = FastMap.newInstance(); try { Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java?rev=759256&r1=759255&r2=759256&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java Fri Mar 27 17:01:52 2009 @@ -46,9 +46,9 @@ /** WorkEffortWorker - Work Effort worker class. */ public class WorkEffortWorker { - + public static final String module = WorkEffortWorker.class.getName(); - + /** @deprecated */ public static void getWorkEffort(PageContext pageContext, String workEffortIdAttrName, String workEffortAttrName, String partyAssignsAttrName, String canViewAttrName, String tryEntityAttrName, String currentStatusAttrName) { @@ -161,7 +161,7 @@ pageContext.setAttribute(attribute, aC); } } - + public static List<GenericValue> getLowestLevelWorkEfforts(GenericDelegator delegator, String workEffortId, String workEffortAssocTypeId) { List<GenericValue> workEfforts = FastList.newInstance(); try { |
Free forum by Nabble | Edit this page |