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 http://www.opensource.org/licenses/ecl2.php 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;
 
 
A user, workgroup, or role who is responsible for an Action Request.

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
See also:
org.kuali.rice.kew.actionrequest.ActionRequestValue
 
 public class ResponsibleParty implements Serializable {
 
 	private static final long serialVersionUID = 6788236688949489851L;
 
 	private String principalId;
     private String groupId;
     private String roleName;
 
     public ResponsibleParty() {
     }
 
     public static ResponsibleParty fromGroupId(String groupId) {
 		ResponsibleParty responsibleParty = new ResponsibleParty();
 		responsibleParty.setGroupId(groupId);
 		return responsibleParty;
 	}
 	
 	public static ResponsibleParty fromPrincipalId(String principalId) {
 		ResponsibleParty responsibleParty = new ResponsibleParty();
 		responsibleParty.setPrincipalId(principalId);
 		return responsibleParty;
 	}
 	
 	public static ResponsibleParty fromRoleName(String roleName) {
 		ResponsibleParty responsibleParty = new ResponsibleParty();
 		responsibleParty.setRoleName(roleName);
 		return responsibleParty;
 	}
 
     public String toString() {
         StringBuffer sb = new StringBuffer("[");
         if ( != null) {
             sb.append("user=");
             sb.append(.toString());
         } else if ( != null) {
             sb.append("groupID=");
             sb.append(.toString());
         } else if ( != null) {
             sb.append("roleName=");
             sb.append();
         }
         sb.append("]");
         return sb.toString();
     }
 
     public String getGroupId() {
         return ;
     }
 
     public String getPrincipalId() {
         return ;
     }
     
     public void setPrincipalId(String principalId) {
         this. = principalId;
     }
 
     public String getRoleName() {
         return ;
     }
 
     public void setGroupId(String groupId) {
         this. = groupId;
     }
 
     public void setRoleName(String roleName) {
         this. = roleName;
     }
 
     public boolean isPrincipal() {
        return getPrincipalId() != null;
    }
    public boolean isGroup() {
        return getGroupId() != null;
    }
    public boolean isRole() {
        return getRoleName() != null;
    }
    
New to GrepCode? Check out our FAQ X