1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.lookup; |
17 | |
|
18 | |
import org.apache.commons.lang.StringUtils; |
19 | |
import org.kuali.rice.kew.util.KEWConstants; |
20 | |
import org.kuali.rice.kim.util.KimCommonUtilsInternal; |
21 | |
import org.kuali.rice.kim.util.KimConstants; |
22 | |
import org.kuali.rice.kns.lookup.KualiLookupableImpl; |
23 | |
import org.kuali.rice.kns.util.KNSConstants; |
24 | |
import org.kuali.rice.kns.util.UrlFactory; |
25 | |
|
26 | |
import java.util.Properties; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | 0 | public class GroupLookupableImpl extends KualiLookupableImpl { |
35 | |
|
36 | |
private static final long serialVersionUID = -7862240710174441633L; |
37 | |
|
38 | |
public String getCreateNewUrl() { |
39 | 0 | String url = ""; |
40 | 0 | if((getLookupableHelperService()).allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_TYPE_NAME)){ |
41 | 0 | Properties parameters = new Properties(); |
42 | 0 | parameters.put(KNSConstants.DISPATCH_REQUEST_PARAMETER, KNSConstants.DOC_HANDLER_METHOD); |
43 | 0 | parameters.put(KNSConstants.PARAMETER_COMMAND, KEWConstants.INITIATE_COMMAND); |
44 | 0 | parameters.put(KNSConstants.DOCUMENT_TYPE_NAME, KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_TYPE_NAME); |
45 | 0 | if (StringUtils.isNotBlank(getReturnLocation())) { |
46 | 0 | parameters.put(KNSConstants.RETURN_LOCATION_PARAMETER, getReturnLocation()); |
47 | |
} |
48 | 0 | url = getCreateNewUrl(UrlFactory.parameterizeUrl( |
49 | |
KimCommonUtilsInternal.getKimBasePath()+KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_ACTION, parameters)); |
50 | |
} |
51 | 0 | return url; |
52 | |
} |
53 | |
|
54 | |
} |