Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2012 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.kim.impl.permission;
 
 
 import java.util.List;
 import java.util.Map;
 
 import static org.kuali.rice.core.api.criteria.PredicateFactory.*;
 
 public class PermissionServiceImpl implements PermissionService {
 
 
     // --------------------
     // Authorization Checks
     // --------------------
 
     protected PermissionTypeService getPermissionTypeServicePermissionTemplateBo permissionTemplate ) {
     	if ( permissionTemplate == null ) {
     		throw new IllegalArgumentException"permissionTemplate may not be null" );
     	}
     	KimType kimType = .getKimTypepermissionTemplate.getKimTypeId() );
     	String serviceName = kimType.getServiceName();
     	// if no service specified, return a default implementation
     	if ( StringUtils.isBlankserviceName ) ) {
     		return ;
     	}
     	try {
 	    	Object service = GlobalResourceLoader.getService(serviceName);
 	    	// if we have a service name, it must exist
 	    	if ( service == null ) {
 				throw new RuntimeException("null returned for permission type service for service name: " + serviceName);
 	    	}
 	    	// whatever we retrieved must be of the correct type
 	    	if ( !(service instanceof PermissionTypeService)  ) {
 	    		throw new RuntimeException"Service " + serviceName + " was not a PermissionTypeService.  Was: " + service.getClass().getName() );
 	    	}
 	    	return (PermissionTypeService)service;
     	} catchException ex ) {
     		// sometimes service locators throw exceptions rather than returning null, handle that
     		throw new RuntimeException"Error retrieving service: " + serviceName + " from the KimImplServiceLocator."ex );
     	}
     }
 
     @Override
     public boolean hasPermission(String principalIdString namespaceCode,
                                 String permissionNamethrows RiceIllegalArgumentException  {
        incomingParamCheck(principalId"principalId");
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionName"permissionName");
        return isAuthorizedprincipalIdnamespaceCodepermissionName, Collections.<StringString>emptyMap() );
    }
    @Override
    public boolean isAuthorized(String principalIdString namespaceCode,
                                String permissionNameMap<StringStringqualification ) throws RiceIllegalArgumentException {
        incomingParamCheck(principalId"principalId");
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionName"permissionName");
        incomingParamCheck(qualification"qualification");
        List<StringroleIds = getRoleIdsForPermissionnamespaceCodepermissionName );
    	if ( roleIds.isEmpty() ) {
    		return false;
    	}
		return .principalHasRoleprincipalIdroleIdsqualification);
    }
    @Override
    public boolean hasPermissionByTemplate(String principalIdString namespaceCodeString permissionTemplateName,
            Map<StringStringpermissionDetailsthrows RiceIllegalArgumentException {
        incomingParamCheck(principalId"principalId");
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionTemplateName"permissionTemplateName");
        return isAuthorizedByTemplate(principalIdnamespaceCodepermissionTemplateNamepermissionDetails,
                Collections.<StringString>emptyMap());
    }
    @Override
    public boolean isAuthorizedByTemplate(String principalIdString namespaceCodeString permissionTemplateName,
            Map<StringStringpermissionDetailsMap<StringStringqualificationthrows RiceIllegalArgumentException {
        incomingParamCheck(principalId"principalId");
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionTemplateName"permissionTemplateName");
        incomingParamCheck(qualification"qualification");
        List<StringroleIds = getRoleIdsForPermissionTemplatenamespaceCodepermissionTemplateNamepermissionDetails );
    	if ( roleIds.isEmpty() ) {
    		return false;
    	}
    	return .principalHasRoleprincipalIdroleIdsqualification);
    }
    @Override
    public List<PermissiongetAuthorizedPermissionsString principalId,
            String namespaceCodeString permissionName,
            Map<StringStringqualification ) throws RiceIllegalArgumentException {
        incomingParamCheck(principalId"principalId");
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionName"permissionName");
        incomingParamCheck(qualification"qualification");
        // get all the permission objects whose name match that requested
    	List<PermissionBopermissions = getPermissionImplsByNamenamespaceCodepermissionName );
    	// now, filter the full list by the detail passed
    	List<PermissionapplicablePermissions = getMatchingPermissionspermissionsnull );
    	return getPermissionsForUser(principalIdapplicablePermissionsqualification);
    }
    @Override
    public List<PermissiongetAuthorizedPermissionsByTemplate(String principalIdString namespaceCode,
            String permissionTemplateNameMap<StringStringpermissionDetailsMap<StringStringqualificationthrows RiceIllegalArgumentException {
        incomingParamCheck(principalId"principalId");
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionTemplateName"permissionTemplateName");
        incomingParamCheck(qualification"qualification");
        // get all the permission objects whose name match that requested
    	List<PermissionBopermissions = getPermissionImplsByTemplateNamenamespaceCodepermissionTemplateName );
    	// now, filter the full list by the detail passed
    	List<PermissionapplicablePermissions = getMatchingPermissionspermissionspermissionDetails );
    	return getPermissionsForUser(principalIdapplicablePermissionsqualification);
    }
    
    
Checks the list of permissions against the principal's roles and returns a subset of the list which match.
    protected List<PermissiongetPermissionsForUserString principalIdList<Permissionpermissions,
            Map<StringStringqualification ) {
    	ArrayList<Permissionresults = new ArrayList<Permission>();
    	List<PermissiontempList = new ArrayList<Permission>(1);
    	for ( Permission perm : permissions ) {
    		tempList.clear();
    		tempList.addperm );
    		List<StringroleIds = getRoleIdsForPermissionstempList );
    		// TODO: This could be made a little better by collecting the role IDs into
    		// a set and then processing the distinct list rather than a check
    		// for every permission
    		if ( roleIds != null && !roleIds.isEmpty() ) {
    			if ( .principalHasRoleprincipalIdroleIdsqualification) ) {
    				results.addperm );
    			}
    		}
    	}
    	
    	return Collections.unmodifiableList(results);
    }
    	Map<String,PermissionTypeServicepermissionTypeServices = new HashMap<StringPermissionTypeService>( permissions.size() );
    	for ( PermissionBo perm : permissions ) {
    		permissionTypeServices.put(perm.getTemplateId(), getPermissionTypeServiceperm.getTemplate() ) );    				
    	}
    	return permissionTypeServices;
    }
    
    @SuppressWarnings("static-access")
    	Map<String,List<Permission>> results = new HashMap<String,List<Permission>>();
    	for ( PermissionBo perm : permissions ) {
    		List<Permissionperms = results.getperm.getTemplateId() );
    		if ( perms == null ) {
    			perms = new ArrayList<Permission>();
    			results.putperm.getTemplateId(), perms );
    		}
    		perms.add( PermissionBo.to(perm) );
    	}
    	return results;
    }
    
Compare each of the passed in permissions with the given permissionDetails. Those that match are added to the result list.
    protected List<PermissiongetMatchingPermissionsList<PermissionBopermissionsMap<StringStringpermissionDetails ) {
    	List<PermissionapplicablePermissions = new ArrayList<Permission>();    	
    	if ( permissionDetails == null || permissionDetails.isEmpty() ) {
    		// if no details passed, assume that all match
    		for ( PermissionBo perm : permissions ) {
    			applicablePermissions.add( PermissionBo.to(perm) );
    		}
    	} else {
    		// otherwise, attempt to match the permission details
    		// build a map of the template IDs to the type services
    		Map<String,PermissionTypeServicepermissionTypeServices = getPermissionTypeServicesByTemplateIdpermissions );
    		// build a map of permissions by template ID
    		Map<String,List<Permission>> permissionMap = groupPermissionsByTemplatepermissions );
    		// loop over the different templates, matching all of the same template against the type
    		// service at once
    		for ( Map.Entry<String,List<Permission>> entry : permissionMap.entrySet() ) {
    			PermissionTypeService permissionTypeService = permissionTypeServices.getentry.getKey() );
    			List<PermissionpermissionList = entry.getValue();
				applicablePermissions.addAllpermissionTypeService.getMatchingPermissionspermissionDetailspermissionList ) );    				
    		}
    	}
    	return applicablePermissions;
    }
    @Override
    public List<AssigneegetPermissionAssigneesString namespaceCodeString permissionName,
            Map<StringStringqualification ) throws RiceIllegalArgumentException {
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionName"permissionName");
        incomingParamCheck(qualification"qualification");
    	List<StringroleIds = getRoleIdsForPermissionnamespaceCodepermissionName);
    	if ( roleIds.isEmpty() ) {
    		return Collections.emptyList();
    	}
    	Collection<RoleMembershiproleMembers = .getRoleMembersroleIds,qualification );
    	List<Assigneeresults = new ArrayList<Assignee>();
        for ( RoleMembership rm : roleMembers ) {
			List<DelegateType.BuilderdelegateBuilderList = new ArrayList<DelegateType.Builder>();
			if (!rm.getDelegates().isEmpty()) {
    			for (DelegateType delegate : rm.getDelegates()){
                    delegateBuilderList.add(DelegateType.Builder.create(delegate));
    			}
			}
    		if ( ..equals(rm.getType()) ) {
    			results.add (Assignee.Builder.create(rm.getMemberId(), nulldelegateBuilderList).build());
    		} else if ( ..equals(rm.getType()) ) {
    			results.add (Assignee.Builder.create(nullrm.getMemberId(), delegateBuilderList).build());
    		}
    	}
    	return Collections.unmodifiableList(results);
    }
    @Override
    public List<AssigneegetPermissionAssigneesByTemplate(String namespaceCodeString permissionTemplateName,
            Map<StringStringpermissionDetailsMap<StringStringqualificationthrows RiceIllegalArgumentException {
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionTemplateName"permissionTemplateName");
        incomingParamCheck(qualification"qualification");
    	List<StringroleIds = getRoleIdsForPermissionTemplatenamespaceCodepermissionTemplateNamepermissionDetails);
    	if ( roleIds.isEmpty() ) {
    		return Collections.emptyList();
    	}
    	Collection<RoleMembershiproleMembers = .getRoleMembersroleIds,qualification);
    	List<Assigneeresults = new ArrayList<Assignee>();
        for ( RoleMembership rm : roleMembers ) {
			List<DelegateType.BuilderdelegateBuilderList = new ArrayList<DelegateType.Builder>();
			if (!rm.getDelegates().isEmpty()) {
    			for (DelegateType delegate : rm.getDelegates()){
                    delegateBuilderList.add(DelegateType.Builder.create(delegate));
    			}
			}
    		if ( ..equals(rm.getType()) ) {
    			results.add (Assignee.Builder.create(rm.getMemberId(), nulldelegateBuilderList).build());
    		} else { // a group membership
    			results.add (Assignee.Builder.create(nullrm.getMemberId(), delegateBuilderList).build());
    		}
    	}
    	return Collections.unmodifiableList(results);
    }
    @Override
    public boolean isPermissionDefinedString namespaceCodeString permissionName ) throws RiceIllegalArgumentException {
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionName"permissionName");
    	// get all the permission objects whose name match that requested
    	List<PermissionBopermissions = getPermissionImplsByNamenamespaceCodepermissionName );
    	// now, filter the full list by the detail passed
    	return !getMatchingPermissionspermissionsnull ).isEmpty();
    }
    @Override
    public boolean isPermissionDefinedByTemplate(String namespaceCodeString permissionTemplateName,
            Map<StringStringpermissionDetailsthrows RiceIllegalArgumentException {
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionTemplateName"permissionTemplateName");
    	// get all the permission objects whose name match that requested
    	List<PermissionBopermissions = getPermissionImplsByTemplateNamenamespaceCodepermissionTemplateName );
    	// now, filter the full list by the detail passed
    	return !getMatchingPermissionspermissionspermissionDetails ).isEmpty();
    }
    @Override
    public List<StringgetRoleIdsForPermission(String namespaceCodeString permissionNamethrows RiceIllegalArgumentException {
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionName"permissionName");
        // get all the permission objects whose name match that requested
        List<PermissionBopermissions = getPermissionImplsByName(namespaceCodepermissionName);
        // now, filter the full list by the detail passed
        List<PermissionapplicablePermissions = getMatchingPermissions(permissionsnull);
        return getRoleIdsForPermissions(applicablePermissions);
    }
    protected List<StringgetRoleIdsForPermissionTemplateString namespaceCodeString permissionTemplateNameMap<StringStringpermissionDetails ) {
    	// get all the permission objects whose name match that requested
    	List<PermissionBopermissions = getPermissionImplsByTemplateNamenamespaceCodepermissionTemplateName );
    	// now, filter the full list by the detail passed
    	List<PermissionapplicablePermissions = getMatchingPermissionspermissionspermissionDetails );
    	return getRoleIdsForPermissionsapplicablePermissions );
    }
    // --------------------
    // Permission Data
    // --------------------
    
    @Override
    public Permission getPermission(String permissionIdthrows RiceIllegalArgumentException {
        incomingParamCheck(permissionId"permissionId");
        PermissionBo impl = getPermissionImplpermissionId );
    	if ( impl != null ) {
    		return PermissionBo.to(impl);
    	}
    	return null;
    }
    
    @Override
    public List<PermissionfindPermissionsByTemplate(String namespaceCodeString permissionTemplateNamethrows RiceIllegalArgumentException {
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionTemplateName"permissionTemplateName");
        List<PermissionBoimpls = getPermissionImplsByTemplateNamenamespaceCodepermissionTemplateName );
    	List<Permissionresults = new ArrayList<Permission>(impls.size());
    	for (PermissionBo impl : impls) {
    	    results.add(PermissionBo.to(impl));
    	}
    	return Collections.unmodifiableList(results);
    }
    	incomingParamCheck(permissionId"permissionId");
        HashMap<String,Objectpk = new HashMap<String,Object>( 1 );
        pk.put..permissionId );
        return .findByPrimaryKeyPermissionBo.classpk );
    }
    
    protected List<PermissionBogetPermissionImplsByTemplateNameString namespaceCodeString permissionTemplateName ){
        HashMap<String,Objectpk = new HashMap<String,Object>( 3 );
        pk.put"template.namespaceCode"namespaceCode );
        pk.put"template.name"permissionTemplateName );
        pk.put."Y" );
        return ((List<PermissionBo>) .findMatchingPermissionBo.classpk ));
    }
    protected List<PermissionBogetPermissionImplsByNameString namespaceCodeString permissionName ) {
        HashMap<String,Objectpk = new HashMap<String,Object>( 3 );
        pk.put..namespaceCode );
        pk.put..permissionName );
        pk.put."Y" );
        
        return ((List<PermissionBo>) .findMatchingPermissionBo.classpk ));
    }
    @Override
	public Template getPermissionTemplate(String permissionTemplateIdthrows RiceIllegalArgumentException {
        incomingParamCheck(permissionTemplateId"permissionTemplateId");
        PermissionTemplateBo impl = .findBySinglePrimaryKeyPermissionTemplateBo.classpermissionTemplateId );
		if ( impl != null ) {
			return PermissionTemplateBo.to(impl);
		}
		return null;
	}
    @Override
            String permissionTemplateNamethrows RiceIllegalArgumentException {
		incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionTemplateName"permissionTemplateName");
        Map<String,Stringcriteria = new HashMap<String,String>(2);
		criteria.put..namespaceCode );
		criteria.put..permissionTemplateName );
		if ( impl != null ) {
			return PermissionTemplateBo.to(impl);
		}
		return null;
	}
    @Override
		if ( .isEmpty() ) {
			Map<String,Stringcriteria = new HashMap<String,String>(1);
			criteria.put."Y" );
			List<Templateinfos = new ArrayList<Template>( impls.size() );
			for ( PermissionTemplateBo impl : impls ) {
				infos.add( PermissionTemplateBo.to(impl) );
			}
			Collections.sort(infosnew Comparator<Template>() {
				@Override public int compare(Template tmpl1,
						Template tmpl2) {
					int result = tmpl1.getNamespaceCode().compareTo(tmpl2.getNamespaceCode());
					if ( result != 0 ) {
						return result;
					}
					result = tmpl1.getName().compareTo(tmpl2.getName());
					return result;
				}
			});
		}
		return Collections.unmodifiableList();
    }
        incomingParamCheck(permission"permission");
        if (StringUtils.isNotBlank(permission.getId()) && getPermission(permission.getId()) != null) {
            throw new RiceIllegalStateException("the permission to create already exists: " + permission);
        }
        List<PermissionAttributeBoattrBos = Collections.emptyList();
        if (permission.getTemplate() != null) {
            attrBos = KimAttributeDataBo.createFrom(PermissionAttributeBo.classpermission.getAttributes(), permission.getTemplate().getKimTypeId());
        }
        PermissionBo bo = PermissionBo.from(permission);
        if (bo.getTemplate() == null && bo.getTemplateId() != null) {
            bo.setTemplate(PermissionTemplateBo.from(getPermissionTemplate(bo.getTemplateId())));
        }
        bo.setAttributeDetails(attrBos);
        return PermissionBo.to(.save(bo));
	}
        incomingParamCheck(permission"permission");
        PermissionBo oldPermission = getPermissionImpl(permission.getId());
        if (StringUtils.isBlank(permission.getId()) || oldPermission == null) {
            throw new RiceIllegalStateException("the permission does not exist: " + permission);
        }
        //List<PermissionAttributeBo> attrBos = KimAttributeDataBo.createFrom(PermissionAttributeBo.class, permission.getAttributes(), permission.getTemplate().getKimTypeId());
        List<PermissionAttributeBooldAttrBos = oldPermission.getAttributeDetails();
        //put old attributes in map for easier updating
        Map<StringPermissionAttributeBooldAttrMap = new HashMap<StringPermissionAttributeBo>();
        for (PermissionAttributeBo oldAttr : oldAttrBos) {
            oldAttrMap.put(oldAttr.getKimAttribute().getAttributeName(), oldAttr);
        }
        List<PermissionAttributeBonewAttrBos = new ArrayList<PermissionAttributeBo>();
        for (String key : permission.getAttributes().keySet()) {
            if (oldAttrMap.containsKey(key)) {
                PermissionAttributeBo updatedAttr = oldAttrMap.get(key);
                updatedAttr.setAttributeValue(permission.getAttributes().get(key));
                newAttrBos.add(updatedAttr);
            } else { //new attribute
                newAttrBos.addAll(KimAttributeDataBo.createFrom(PermissionAttributeBo.class, Collections.singletonMap(keypermission.getAttributes().get(key)), permission.getTemplate().getKimTypeId()));
            }
        }
        PermissionBo bo = PermissionBo.from(permission);
        if (CollectionUtils.isNotEmpty(newAttrBos)) {
            if(null!= bo.getAttributeDetails())  {
                bo.getAttributeDetails().clear();
            }
            bo.setAttributeDetails(newAttrBos);
        }
        if (bo.getTemplate() == null && bo.getTemplateId() != null) {
            bo.setTemplate(PermissionTemplateBo.from(getPermissionTemplate(bo.getTemplateId())));
        }
        return PermissionBo.to(.save(bo));		
	}
    @Override
    public Permission findPermByNamespaceCodeAndName(String namespaceCodeString permissionName)
            throws RiceIllegalArgumentException {
        incomingParamCheck(namespaceCode"namespaceCode");
        incomingParamCheck(permissionName"permissionName");
        PermissionBo permissionBo = getPermissionBoByName(namespaceCodepermissionName);
        if (permissionBo != null) {
            return PermissionBo.to(permissionBo);
        }
        return null;
    }
    
    protected PermissionBo getPermissionBoByName(String namespaceCodeString permissionName) {
        if (StringUtils.isBlank(namespaceCode)
                || StringUtils.isBlank(permissionName)) {
            return null;
        }
        Map<StringStringcriteria = new HashMap<StringString>();
        criteria.put(..namespaceCode);
        criteria.put(..permissionName);
        criteria.put(."Y");
        // while this is not actually the primary key - there will be at most one row with these criteria
        return .findByPrimaryKey(PermissionBo.classcriteria);
    }
    @Override
    public PermissionQueryResults findPermissions(final QueryByCriteria queryByCriteria)
            throws RiceIllegalArgumentException {
        incomingParamCheck(queryByCriteria"queryByCriteria");
        LookupCustomizer.Builder<PermissionBolc = LookupCustomizer.Builder.create();
        lc.setPredicateTransform(AttributeTransform.getInstance());
        GenericQueryResults<PermissionBoresults = .lookup(PermissionBo.classqueryByCriterialc.build());
        PermissionQueryResults.Builder builder = PermissionQueryResults.Builder.create();
        builder.setMoreResultsAvailable(results.isMoreResultsAvailable());
        builder.setTotalRowCount(results.getTotalRowCount());
        final List<Permission.Builderims = new ArrayList<Permission.Builder>();
        for (PermissionBo bo : results.getResults()) {
            ims.add(Permission.Builder.create(bo));
        }
        builder.setResults(ims);
        return builder.build();
    }
    @Override
    public TemplateQueryResults findPermissionTemplates(final QueryByCriteria queryByCriteria)
            throws RiceIllegalArgumentException {
        incomingParamCheck(queryByCriteria"queryByCriteria");
        GenericQueryResults<PermissionTemplateBoresults = .lookup(PermissionTemplateBo.classqueryByCriteria);
        TemplateQueryResults.Builder builder = TemplateQueryResults.Builder.create();
        builder.setMoreResultsAvailable(results.isMoreResultsAvailable());
        builder.setTotalRowCount(results.getTotalRowCount());
        final List<Template.Builderims = new ArrayList<Template.Builder>();
        for (PermissionTemplateBo bo : results.getResults()) {
            ims.add(Template.Builder.create(bo));
        }
        builder.setResults(ims);
        return builder.build();
    }
    private List<StringgetRoleIdsForPermissionsCollection<Permissionpermissions ) {
        if (CollectionUtils.isEmpty(permissions)) {
            return Collections.emptyList();
        }
        List<Stringids = new ArrayList<String>();
        for (Permission p : permissions) {
            ids.add(p.getId());
        }
        QueryByCriteria query = QueryByCriteria.Builder.fromPredicates(equal("active""true"), in("permissionId"ids.toArray(new String[]{})));
        List<StringroleIds = new ArrayList<String>();
        for (RolePermissionBo bo : results.getResults()) {
            roleIds.add(bo.getRoleId());
        }
        return Collections.unmodifiableList(roleIds);
    }

Sets the kimTypeInfoService attribute value.

Parameters:
kimTypeInfoService The kimTypeInfoService to set.
	public void setKimTypeInfoService(KimTypeInfoService kimTypeInfoService) {
		this. = kimTypeInfoService;
	}

Sets the defaultPermissionTypeService attribute value.

Parameters:
defaultPermissionTypeService The defaultPermissionTypeService to set.
	public void setDefaultPermissionTypeService(PermissionTypeService defaultPermissionTypeService) {
    	this. = defaultPermissionTypeService;
	}

Sets the roleService attribute value.

Parameters:
roleService The roleService to set.
	public void setRoleService(RoleService roleService) {
		this. = roleService;
	}

    
Sets the businessObjectService attribute value.

Parameters:
businessObjectService The businessObjectService to set.
    public void setBusinessObjectService(final BusinessObjectService businessObjectService) {
        this. = businessObjectService;
    }

    
Sets the criteriaLookupService attribute value.

Parameters:
criteriaLookupService The criteriaLookupService to set.
    public void setCriteriaLookupService(final CriteriaLookupService criteriaLookupService) {
        this. = criteriaLookupService;
    }
    private void incomingParamCheck(Object objectString name) {
        if (object == null) {
            throw new RiceIllegalArgumentException(name + " was null");
        } else if (object instanceof String
                && StringUtils.isBlank((Stringobject)) {
            throw new RiceIllegalArgumentException(name + " was blank");
        }
    }
New to GrepCode? Check out our FAQ X