01: /*
02: *
03: * Copyright (c) 2004 SourceTap - www.sourcetap.com
04: *
05: * The contents of this file are subject to the SourceTap Public License
06: * ("License"); You may not use this file except in compliance with the
07: * License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
08: * Software distributed under the License is distributed on an "AS IS" basis,
09: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
10: * the specific language governing rights and limitations under the License.
11: *
12: * The above copyright notice and this permission notice shall be included
13: * in all copies or substantial portions of the Software.
14: *
15: */
16:
17: package com.sourcetap.sfa.lead;
18:
19: import org.ofbiz.entity.GenericDelegator;
20: import org.ofbiz.entity.GenericValue;
21:
22: import com.sourcetap.sfa.event.DataMatrix;
23: import com.sourcetap.sfa.event.GenericWebEventProcessor;
24: import com.sourcetap.sfa.ui.UIWebScreenSection;
25:
26: /**
27: * DOCUMENT ME!
28: *
29: */
30: public class LeadQueueWebEventProcessor extends
31: GenericWebEventProcessor {
32: private static final boolean DEBUG = false;
33:
34: /**
35: * This function gets the application path to be used to reconstruct the URI when a
36: * UI History record is logged. Example: "/accounts"
37: * @author John Nutting
38: * @param url The URL used to open the screen section
39: * @return String containing the application path
40: */
41: protected String getUiHistoryAppPath(String url) {
42: return "/leadQueues";
43: }
44:
45: /**
46: * This function gets the description to store in the UI history table. This description
47: * will show up in the UI History drop list.
48: * @author John Nutting
49: * @param dataMatrix DataMatrix object containing the data from the screen
50: * @param delegator Generic delegator through which the data base is accessed
51: * @param action The action being performed on the screen
52: * @param uiWebScreenSection The UIWebScreenSection being used to construct the screen section
53: * @return String containing the UI History description
54: */
55: protected String getUiHistoryDescription(DataMatrix dataMatrix,
56: GenericDelegator delegator, String action,
57: UIWebScreenSection uiWebScreenSection) {
58: GenericValue primaryGV = dataMatrix.getCurrentBuffer()
59: .getGenericValue(0, 0);
60:
61: return "LeadQueue: " + primaryGV.getString("leadQueueName");
62: }
63: }
|