Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package org.kuali.rice.kew.util;
Class was declared multiple times in different classes. Removed from classes and placed here. Also changed some of the logic so that we can stop using workflowUser

Kuali Rice Team (
public class WebFriendlyRecipient implements Recipient{
	private static final long serialVersionUID = 2259350039081951688L;
	private String displayName;
	private String recipientId;
     public WebFriendlyRecipient(String recipientIdString displayName) {
    	 this. = recipientId;
    	 this. = displayName;
     public WebFriendlyRecipient(Object recipient) {
    	 if (recipient instanceof WebFriendlyRecipient) {
              = ((WebFriendlyRecipientrecipient).getRecipientId();
              = ((WebFriendlyRecipientrecipient).getDisplayName();
         // NOTE: ActionItemDAO code is constructing WebFriendlyRecipient directly w/ Person objects
         // this should probably be changed to return only Recipients from DAO tier to web tier
         } else if(recipient instanceof Person){
         	 = ((Person)recipient).getPrincipalId();
        	 = ((Person)recipient).getLastName() + ", " + ((Person)recipient).getFirstName();
         } else if(recipient instanceof KimGroupRecipient){
              = ((KimGroupRecipient)recipient).getGroupId();
              = ((KimGroupRecipient)recipient).getGroup().getNamespaceCode() + ":" + ((KimGroupRecipient)recipient).getGroup().getName();
         }else {
        	throw new IllegalArgumentException("Must pass in type Recipient or Person");
     public String getRecipientId() {
         return ;

	public String getDisplayName() {
		return this.;
New to GrepCode? Check out our FAQ X