CPD Results

The following document contains the results of PMD's CPD 4.2.5.

Duplications

FileProjectLine
org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.javaRice KNS814
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.javaRice KRAD Web Framework757
            String humanReadableFieldName = getDataDictionaryService().getAttributeLabel(dataObjectClass, pkFieldName);

            // append the next field
            pkFieldNames.append(delim + humanReadableFieldName);

            // separate names with commas after the first one
            if (delim.equalsIgnoreCase("")) {
                delim = ", ";
            }
        }

        return pkFieldNames.toString();
    }

    /**
     * This method enforces all business rules that are common to all maintenance documents which must be tested before
     * doing an
     * approval.
     *
     * It can be overloaded in special cases where a MaintenanceDocument has very special needs that would be contrary
     * to what is
     * enforced here.
     *
     * @param document - a populated MaintenanceDocument instance
     * @return true if the document can be approved, false if not
     */
    protected boolean processGlobalApproveDocumentBusinessRules(MaintenanceDocument document) {
        return true;
    }

    /**
     * This method enforces all business rules that are common to all maintenance documents which must be tested before
     * doing a
     * route.
     *
     * It can be overloaded in special cases where a MaintenanceDocument has very special needs that would be contrary
     * to what is
     * enforced here.
     *
     * @param document - a populated MaintenanceDocument instance
     * @return true if the document can be routed, false if not
     */
    protected boolean processGlobalRouteDocumentBusinessRules(MaintenanceDocument document) {
        boolean success = true;

        // require a document description field
        success &= checkEmptyDocumentField(
                KRADPropertyConstants.DOCUMENT_HEADER + "." + KRADPropertyConstants.DOCUMENT_DESCRIPTION,
                document.getDocumentHeader().getDocumentDescription(), "Description");

        return success;
    }

    /**
     * This method enforces all business rules that are common to all maintenance documents which must be tested before
     * doing a
     * save.
     *
     * It can be overloaded in special cases where a MaintenanceDocument has very special needs that would be contrary
     * to what is
     * enforced here.
     *
     * Note that although this method returns a true or false to indicate whether the save should happen or not, this
     * result may not
     * be followed by the calling method. In other words, the boolean result will likely be ignored, and the document
     * saved,
     * regardless.
     *
     * @param document - a populated MaintenanceDocument instance
     * @return true if all business rules succeed, false if not
     */
    protected boolean processGlobalSaveDocumentBusinessRules(MaintenanceDocument document) {
        // default to success
        boolean success = true;

        // do generic checks that impact primary key violations
        primaryKeyCheck(document);

        // this is happening only on the processSave, since a Save happens in both the
        // Route and Save events.
        this.dataDictionaryValidate(document);

        return success;
    }

    /**
     * This method should be overridden to provide custom rules for processing document saving
     *
     * @param document
     * @return boolean
     */
    protected boolean processCustomSaveDocumentBusinessRules(MaintenanceDocument document) {
        return true;
    }

    /**
     * This method should be overridden to provide custom rules for processing document routing
     *
     * @param document
     * @return boolean
     */
    protected boolean processCustomRouteDocumentBusinessRules(MaintenanceDocument document) {
        return true;
    }

    /**
     * This method should be overridden to provide custom rules for processing document approval.
     *
     * @param document
     * @return booelan
     */
    protected boolean processCustomApproveDocumentBusinessRules(MaintenanceDocument document) {
        return true;
    }

    // Document Validation Helper Methods

    /**
     * This method checks to see if the document is in a state that it can be saved without causing exceptions.
     *
     * Note that Business Rules are NOT enforced here, only validity checks.
     *
     * This method will only return false if the document is in such a state that routing it will cause
     * RunTimeExceptions.
     *
     * @param maintenanceDocument - a populated MaintenaceDocument instance.
     * @return boolean - returns true unless the object is in an invalid state.
     */
    protected boolean isDocumentValidForSave(MaintenanceDocument maintenanceDocument) {

        boolean success = true;

        success &= super.isDocumentOverviewValid(maintenanceDocument);
        success &= validateDocumentStructure((Document) maintenanceDocument);
        success &= validateMaintenanceDocument(maintenanceDocument);
        success &= validateGlobalBusinessObjectPersistable(maintenanceDocument);
        return success;
    }

    /**
     * This method makes sure the document itself is valid, and has the necessary fields populated to be routable.
     *
     * This is not a business rules test, rather its a structure test to make sure that the document will not cause
     * exceptions
     * before routing.
     *
     * @param document - document to be tested
     * @return false if the document is missing key values, true otherwise
     */
    protected boolean validateDocumentStructure(Document document) {
        boolean success = true;

        // document must have a populated documentNumber
        String documentHeaderId = document.getDocumentNumber();
        if (documentHeaderId == null || StringUtils.isEmpty(documentHeaderId)) {
            throw new ValidationException("Document has no document number, unable to proceed.");
        }

        return success;
    }

    /**
     * This method checks to make sure the document is a valid maintenanceDocument, and has the necessary values
     * populated such that
     * it will not cause exceptions in later routing or business rules testing.
     *
     * This is not a business rules test.
     *
     * @param maintenanceDocument - document to be tested
     * @return whether maintenance doc passes
     * @throws ValidationException
     */
    protected boolean validateMaintenanceDocument(MaintenanceDocument maintenanceDocument) {
        boolean success = true;
        Maintainable newMaintainable = maintenanceDocument.getNewMaintainableObject();

        // document must have a newMaintainable object
        if (newMaintainable == null) {
            throw new ValidationException(
                    "Maintainable object from Maintenance Document '" + maintenanceDocument.getDocumentTitle() +
                            "' is null, unable to proceed.");
        }

        // document's newMaintainable must contain an object (ie, not null)
        if (newMaintainable.getDataObject() == null) {
            throw new ValidationException("Maintainable's component data object is null.");
        }

        return success;
    }

    /**
     * This method checks whether this maint doc contains Global Business Objects, and if so, whether the GBOs are in a
     * persistable
     * state. This will return false if this method determines that the GBO will cause a SQL Exception when the
     * document
     * is
     * persisted.
     *
     * @param document
     * @return False when the method determines that the contained Global Business Object will cause a SQL Exception,
     *         and the
     *         document should not be saved. It will return True otherwise.
     */
    protected boolean validateGlobalBusinessObjectPersistable(MaintenanceDocument document) {
        boolean success = true;

        if (document.getNewMaintainableObject() == null) {
            return success;
        }
        if (document.getNewMaintainableObject().getDataObject() == null) {
            return success;
        }
        if (!(document.getNewMaintainableObject().getDataObject() instanceof GlobalBusinessObject)) {
            return success;
        }

        PersistableBusinessObject bo = (PersistableBusinessObject) document.getNewMaintainableObject().getDataObject();
        GlobalBusinessObject gbo = (GlobalBusinessObject) bo;
        return gbo.isPersistable();
    }

    /**
     * This method tests to make sure the MaintenanceDocument passed in is based on the class you are expecting.
     *
     * It does this based on the NewMaintainableObject of the MaintenanceDocument.
     *
     * @param document - MaintenanceDocument instance you want to test
     * @param clazz - class you are expecting the MaintenanceDocument to be based on
     * @return true if they match, false if not
     */
    protected boolean isCorrectMaintenanceClass(MaintenanceDocument document, Class clazz) {
        // disallow null arguments
        if (document == null || clazz == null) {
            throw new IllegalArgumentException("Null arguments were passed in.");
        }

        // compare the class names
        if (clazz.toString().equals(document.getNewMaintainableObject().getDataObjectClass().toString())) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * This method accepts an object, and attempts to determine whether it is empty by this method's definition.
     *
     * OBJECT RESULT null false empty-string false whitespace false otherwise true
     *
     * If the result is false, it will add an object field error to the Global Errors.
     *
     * @param valueToTest - any object to test, usually a String
     * @param propertyName - the name of the property being tested
     * @return true or false, by the description above
     */
    protected boolean checkEmptyBOField(String propertyName, Object valueToTest, String parameter) {
        boolean success = true;

        success = checkEmptyValue(valueToTest);

        // if failed, then add a field error
        if (!success) {
            putFieldError(propertyName, RiceKeyConstants.ERROR_REQUIRED, parameter);
        }

        return success;
    }

    /**
     * This method accepts document field (such as , and attempts to determine whether it is empty by this method's
     * definition.
     *
     * OBJECT RESULT null false empty-string false whitespace false otherwise true
     *
     * If the result is false, it will add document field error to the Global Errors.
     *
     * @param valueToTest - any object to test, usually a String
     * @param propertyName - the name of the property being tested
     * @return true or false, by the description above
     */
    protected boolean checkEmptyDocumentField(String propertyName, Object valueToTest, String parameter) {
        boolean success = true;
        success = checkEmptyValue(valueToTest);
        if (!success) {
            putDocumentError(propertyName, RiceKeyConstants.ERROR_REQUIRED, parameter);
        }
        return success;
    }

    /**
     * This method accepts document field (such as , and attempts to determine whether it is empty by this method's
     * definition.
     *
     * OBJECT RESULT null false empty-string false whitespace false otherwise true
     *
     * It will the result as a boolean
     *
     * @param valueToTest - any object to test, usually a String
     */
    protected boolean checkEmptyValue(Object valueToTest) {
        boolean success = true;

        // if its not a string, only fail if its a null object
        if (valueToTest == null) {
            success = false;
        } else {
            // test for null, empty-string, or whitespace if its a string
            if (valueToTest instanceof String) {
                if (StringUtils.isBlank((String) valueToTest)) {
                    success = false;
                }
            }
        }

        return success;
    }

    /**
     * This method is used during debugging to dump the contents of the error map, including the key names. It is not
     * used by the
     * application in normal circumstances at all.
     */
    protected void showErrorMap() {
        if (GlobalVariables.getMessageMap().hasNoErrors()) {
            return;
        }

        for (Iterator i = GlobalVariables.getMessageMap().getAllPropertiesAndErrors().iterator(); i.hasNext(); ) {
            Map.Entry e = (Map.Entry) i.next();

            AutoPopulatingList errorList = (AutoPopulatingList) e.getValue();
            for (Iterator j = errorList.iterator(); j.hasNext(); ) {
                ErrorMessage em = (ErrorMessage) j.next();

                if (em.getMessageParameters() == null) {
                    LOG.error(e.getKey().toString() + " = " + em.getErrorKey());
                } else {
                    LOG.error(e.getKey().toString() + " = " + em.getErrorKey() + " : " +
                            em.getMessageParameters().toString());
                }
            }
        }
    }

    /**
     * @see org.kuali.rice.krad.maintenance.rules.MaintenanceDocumentRule#setupBaseConvenienceObjects(MaintenanceDocument)
     */
    public void setupBaseConvenienceObjects(MaintenanceDocument document) {
FileProjectLine
org/kuali/rice/kew/stats/web/StatsForm.javaRice Implementation89
edu/sampleu/kew/krad/form/StatsForm.javaRice Sample App72
    }

    /**
     * Retrieves the "returnLocation" parameter after calling "populate" on the superclass.
     * 
     * @see org.kuali.rice.krad.web.struts.form.KualiForm#populate(javax.servlet.http.HttpServletRequest)
     */
    //	@Override
    //	public void populate(HttpServletRequest request) {
    //		super.populate(request);
    //		
    //        if (getParameter(request, KRADConstants.RETURN_LOCATION_PARAMETER) != null) {
    //            setBackLocation(getParameter(request, KRADConstants.RETURN_LOCATION_PARAMETER));
    //        }
    //	}

    public void determineBeginDate() {
        SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT + TIME_FORMAT);

        beginningDate = null;
        try {
            if (getBegDate() == null || getBegDate().trim().equals("")) {
                beginningDate = dateFormat.parse(DEFAULT_BEGIN_DATE + BEG_DAY_TIME);
            } else {
                beginningDate = dateFormat.parse(getBegDate() + BEG_DAY_TIME);
            }

            dateFormat = new SimpleDateFormat(DATE_FORMAT);
            begDate = dateFormat.format(beginningDate);
        } catch (ParseException e) {
            //parse error caught in validate methods
        } finally {
            if (beginningDate == null) {
                try {
                    beginningDate = dateFormat.parse(DEFAULT_BEGIN_DATE + BEG_DAY_TIME);
                } catch (ParseException e) {
                    throw new RuntimeException("Default Begin Date format incorrect");
                }
            }
        }
    }

    public void determineEndDate() {
        SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT + TIME_FORMAT);

        endingDate = null;
        try {
            if (getEndDate() == null || getEndDate().trim().equals("")) {
                endingDate = dateFormat.parse(DEFAULT_END_DATE + END_DAY_TIME);
            } else {
                endingDate = dateFormat.parse(getEndDate() + END_DAY_TIME);
            }

            dateFormat = new SimpleDateFormat(DATE_FORMAT);
            endDate = dateFormat.format(endingDate);
        } catch (ParseException e) {
            //parse error caught in validate methods
        } finally {
            if (endingDate == null) {
                try {
                    endingDate = dateFormat.parse(DEFAULT_END_DATE + END_DAY_TIME);
                } catch (ParseException e) {
                    throw new RuntimeException("Default End Date format incorrect");
                }
            }
        }
    }

    public Map makePerUnitOfTimeDropDownMap() {

        Map dropDownMap = new HashMap();
        dropDownMap.put(DAY_TIME_UNIT, KEWConstants.DAILY_UNIT);
        dropDownMap.put(WEEK_TIME_UNIT, KEWConstants.WEEKLY_UNIT);
        dropDownMap.put(MONTH_TIME_UNIT, KEWConstants.MONTHLY_UNIT);
        dropDownMap.put(YEAR_TIME_UNIT, KEWConstants.YEARLY_UNIT);
        return dropDownMap;

    }

    public void validateDates() {
        LOG.debug("validate()");

        //this.validateDate(BEGIN_DATE, this.getBegDate(), "general.error.fieldinvalid");
        //this.validateDate(END_DATE, this.getEndDate(), "general.error.fieldinvalid");
        if (getBegDate() != null && getBegDate().length() != 0) {
            try {
                new SimpleDateFormat(DATE_FORMAT + TIME_FORMAT).parse(getBegDate().trim() + END_DAY_TIME);
            } catch (ParseException e) {
                GlobalVariables.getMessageMap().putError(BEGIN_DATE, "general.error.fieldinvalid", "Begin Date");
            }
        }
        if (getEndDate() != null && getEndDate().length() != 0) {
            try {
                new SimpleDateFormat(DATE_FORMAT + TIME_FORMAT).parse(getEndDate().trim() + END_DAY_TIME);
            } catch (ParseException e) {
                GlobalVariables.getMessageMap().putError(END_DATE, "general.error.fieldinvalid", "End Date");
            }
        }
    }

    public Stats getStats() {
        return stats;
    }

    public void setStats(Stats stats) {
        this.stats = stats;
    }

//    public String getApprovedLabel() {
//        return KEWConstants.ROUTE_HEADER_APPROVED_LABEL;
//    }

    public String getCanceledLabel() {
        return KEWConstants.ROUTE_HEADER_CANCEL_LABEL;
    }

    public String getDisapprovedLabel() {
        return KEWConstants.ROUTE_HEADER_DISAPPROVED_LABEL;
    }

    public String getEnrouteLabel() {
        return KEWConstants.ROUTE_HEADER_ENROUTE_LABEL;
    }

    public String getExceptionLabel() {
        return KEWConstants.ROUTE_HEADER_EXCEPTION_LABEL;
    }

    public String getFinalLabel() {
        return KEWConstants.ROUTE_HEADER_FINAL_LABEL;
    }

    public String getInitiatedLabel() {
        return KEWConstants.ROUTE_HEADER_INITIATED_LABEL;
    }

    public String getProcessedLabel() {
        return KEWConstants.ROUTE_HEADER_PROCESSED_LABEL;
    }

    public String getSavedLabel() {
        return KEWConstants.ROUTE_HEADER_SAVED_LABEL;
    }

    public String getAvgActionsPerTimeUnit() {
        return avgActionsPerTimeUnit;
    }

    public void setAvgActionsPerTimeUnit(String string) {
        avgActionsPerTimeUnit = string;
    }

    public String getBegDate() {
        return begDate;
    }

    public void setBegDate(String begDate) {
        this.begDate = begDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getMethodToCall() {
        return methodToCall;
    }

    public void setMethodToCall(String methodToCall) {
        this.methodToCall = methodToCall;
    }

    public Date getBeginningDate() {
        return beginningDate;
    }

    public void setBeginningDate(Date beginningDate) {
        this.beginningDate = beginningDate;
    }

    public Date getEndingDate() {
        return endingDate;
    }

    public void setEndingDate(Date endingDate) {
        this.endingDate = endingDate;
    }

    public String getDayTimeUnit() {
        return DAY_TIME_UNIT;
    }

    public String getMonthTimeUnit() {
        return MONTH_TIME_UNIT;
    }

    public String getWeekTimeUnit() {
        return WEEK_TIME_UNIT;
    }

    public String getYearTimeUnit() {
        return YEAR_TIME_UNIT;
    }

    public String getBackLocation() {
        return this.backLocation;
    }

    public void setBackLocation(String backLocation) {
        this.backLocation = backLocation;
    }

}
FileProjectLine
org/kuali/rice/krad/document/authorization/DocumentAuthorizerBase.javaRice KRAD Web Framework57
org/kuali/rice/krad/uif/authorization/DocumentAuthorizerBase.javaRice KRAD Web Framework53
        if (LOG.isDebugEnabled()) {
            LOG.debug("calling DocumentAuthorizerBase.getDocumentActionFlags for document '"
                    + document.getDocumentNumber() + "'. user '" + user.getPrincipalName() + "'");
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_EDIT)
                && !isAuthorizedByTemplate(document, KRADConstants.KRAD_NAMESPACE,
                        KimConstants.PermissionTemplateNames.EDIT_DOCUMENT, user.getPrincipalId())) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_EDIT);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_COPY)
                && !isAuthorizedByTemplate(document, KRADConstants.KRAD_NAMESPACE,
                        KimConstants.PermissionTemplateNames.COPY_DOCUMENT, user.getPrincipalId())) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_COPY);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE)
                && !isAuthorizedByTemplate(document, KRADConstants.KUALI_RICE_WORKFLOW_NAMESPACE,
                        KimConstants.PermissionTemplateNames.BLANKET_APPROVE_DOCUMENT, user.getPrincipalId())) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_CANCEL)
                && !isAuthorizedByTemplate(document, KRADConstants.KUALI_RICE_WORKFLOW_NAMESPACE,
                        KimConstants.PermissionTemplateNames.CANCEL_DOCUMENT, user.getPrincipalId())) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_CANCEL);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_SAVE)
                && !isAuthorizedByTemplate(document, KRADConstants.KUALI_RICE_WORKFLOW_NAMESPACE,
                        KimConstants.PermissionTemplateNames.SAVE_DOCUMENT, user.getPrincipalId())) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_SAVE);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_ROUTE)
                && !isAuthorizedByTemplate(document, KRADConstants.KUALI_RICE_WORKFLOW_NAMESPACE,
                        KimConstants.PermissionTemplateNames.ROUTE_DOCUMENT, user.getPrincipalId())) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_ROUTE);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_ACKNOWLEDGE)
                && !canTakeRequestedAction(document, KEWConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ, user)) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_ACKNOWLEDGE);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_FYI)
                && !canTakeRequestedAction(document, KEWConstants.ACTION_REQUEST_FYI_REQ, user)) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_FYI);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_APPROVE)
                || documentActions.contains(KRADConstants.KUALI_ACTION_CAN_DISAPPROVE)) {
            if (!canTakeRequestedAction(document, KEWConstants.ACTION_REQUEST_APPROVE_REQ, user)) {
                documentActions.remove(KRADConstants.KUALI_ACTION_CAN_APPROVE);
                documentActions.remove(KRADConstants.KUALI_ACTION_CAN_DISAPPROVE);
            }
        }

        if (!canSendAnyTypeAdHocRequests(document, user)) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_ADD_ADHOC_REQUESTS);
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_SEND_ADHOC_REQUESTS);
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_SEND_NOTE_FYI);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_SEND_NOTE_FYI)
                && !canSendAdHocRequests(document, KEWConstants.ACTION_REQUEST_FYI_REQ, user)) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_SEND_NOTE_FYI);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_ANNOTATE)
                && !documentActions.contains(KRADConstants.KUALI_ACTION_CAN_EDIT)) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_ANNOTATE);
        }

        if (documentActions.contains(KRADConstants.KUALI_ACTION_CAN_EDIT__DOCUMENT_OVERVIEW)
                && !canEditDocumentOverview(document, user)) {
            documentActions.remove(KRADConstants.KUALI_ACTION_CAN_EDIT__DOCUMENT_OVERVIEW);
        }

        return documentActions;
    }

    public final boolean canInitiate(String documentTypeName, Person user) {
		String nameSpaceCode = KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE;
		Map<String, String> permissionDetails = new HashMap<String, String>();
		permissionDetails.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME,
				documentTypeName);
		return getPermissionService().isAuthorizedByTemplateName(
				user.getPrincipalId(), nameSpaceCode,
				KimConstants.PermissionTemplateNames.INITIATE_DOCUMENT,
				permissionDetails, Collections.<String, String>emptyMap());
	}

	public final boolean canReceiveAdHoc(Document document, Person user,
			String actionRequestCode) {
		Map<String,String> additionalPermissionDetails = new HashMap<String, String>();
		additionalPermissionDetails.put(KimConstants.AttributeConstants.ACTION_REQUEST_CD, actionRequestCode);
		return isAuthorizedByTemplate(document,
				KRADConstants.KUALI_RICE_WORKFLOW_NAMESPACE,
				KimConstants.PermissionTemplateNames.AD_HOC_REVIEW_DOCUMENT,
				user.getPrincipalId(), additionalPermissionDetails, null );
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl732
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl775
        for (AgendaItemBo agendaItem : agenda.getItems()) {
            if (agenda.getFirstItemId().equals(agendaItem.getId())) {
                firstItem = agendaItem;
                break;
            }
        }
        return firstItem;
    }
    
    /**
     * @return the closest younger sibling of the agenda item with the given ID, and if there is no such sibling, the closest younger cousin.
     * If there is no such cousin either, then null is returned.
     */
    private AgendaItemBo getNextYoungestOfSameGeneration(AgendaItemBo root, AgendaItemBo agendaItem) {

        int genNumber = getAgendaItemGenerationNumber(0, root, agendaItem.getId());
        List<AgendaItemBo> genList = new ArrayList<AgendaItemBo>();
        buildAgendaItemGenerationList(genList, root, 0, genNumber);

        int itemIndex = genList.indexOf(agendaItem);
        if (genList.size() > itemIndex + 1) return genList.get(itemIndex + 1);

        return null;
    }

    private int getAgendaItemGenerationNumber(int currentLevel, AgendaItemBo node, String agendaItemId) {
        int result = -1;
        if (agendaItemId.equals(node.getId())) {
            result = currentLevel;
        } else {
            for (AgendaItemChildAccessor childAccessor : AgendaItemChildAccessor.linkedNodes) {
                AgendaItemBo child = childAccessor.getChild(node);
                if (child != null) {
                    int nextLevel = currentLevel;
                    // we don't change the level order parent when we traverse ALWAYS links
                    if (childAccessor != AgendaItemChildAccessor.always) {
                        nextLevel = currentLevel +1;
                    }
                    result = getAgendaItemGenerationNumber(nextLevel, child, agendaItemId);
                    if (result != -1) break;
                }
            }
        }
        return result;
    }

    private void buildAgendaItemGenerationList(List<AgendaItemBo> genList, AgendaItemBo node, int currentLevel, int generation) {
        if (currentLevel == generation) {
            genList.add(node);
        }

        if (currentLevel > generation) return;

        for (AgendaItemChildAccessor childAccessor : AgendaItemChildAccessor.linkedNodes) {
            AgendaItemBo child = childAccessor.getChild(node);
            if (child != null) {
                int nextLevel = currentLevel;
                // we don't change the level order parent when we traverse ALWAYS links
                if (childAccessor != AgendaItemChildAccessor.always) {
                    nextLevel = currentLevel +1;
                }
                buildAgendaItemGenerationList(genList, child, nextLevel, generation);
            }
        }
    }
    

    /**
     * @return the closest older sibling of the agenda item with the given ID, and if there is no such sibling, the closest older cousin.
     * If there is no such cousin either, then null is returned.
     */
    private AgendaItemBo getNextOldestOfSameGeneration(AgendaItemBo root, AgendaItemBo agendaItem) {

        int genNumber = getAgendaItemGenerationNumber(0, root, agendaItem.getId());
        List<AgendaItemBo> genList = new ArrayList<AgendaItemBo>();
        buildAgendaItemGenerationList(genList, root, 0, genNumber);

        int itemIndex = genList.indexOf(agendaItem);
        if (itemIndex >= 1) return genList.get(itemIndex - 1);

        return null;
    }
    

    /**
     * returns the parent of the item with the passed in id.  Note that {@link AgendaItemBo}s related by ALWAYS relationships are considered siblings.
     */ 
    private AgendaItemBo getParent(AgendaItemBo root, String agendaItemId) {
        return getParentHelper(root, null, agendaItemId);
    }
    
    private AgendaItemBo getParentHelper(AgendaItemBo node, AgendaItemBo levelOrderParent, String agendaItemId) {
        AgendaItemBo result = null;
        if (agendaItemId.equals(node.getId())) {
            result = levelOrderParent;
        } else {
            for (AgendaItemChildAccessor childAccessor : AgendaItemChildAccessor.linkedNodes) {
                AgendaItemBo child = childAccessor.getChild(node);
                if (child != null) {
                    // we don't change the level order parent when we traverse ALWAYS links 
                    AgendaItemBo lop = (childAccessor == AgendaItemChildAccessor.always) ? levelOrderParent : node;
                    result = getParentHelper(child, lop, agendaItemId);
                    if (result != null) break;
                }
            }
        }
        return result;
    }

    /**
     * Search the tree for the agenda item with the given id.
     */
    private AgendaItemBo getAgendaItemById(AgendaItemBo node, String agendaItemId) {
        if (node == null) throw new IllegalArgumentException("node must be non-null");

        AgendaItemBo result = null;
        
        if (agendaItemId.equals(node.getId())) {
            result = node;
        } else {
            for (AgendaItemChildAccessor childAccessor : AgendaItemChildAccessor.linkedNodes) {
                AgendaItemBo child = childAccessor.getChild(node);
                if (child != null) {
                    result = getAgendaItemById(child, agendaItemId);
                    if (result != null) break;
                }
            }
        } 
        return result;
    }

    /**
     * This method gets the agenda from the form
     * 
     * @param form
     * @param request
     * @return
     */
    private AgendaBo getAgenda(UifFormBase form, HttpServletRequest request) {
FileProjectLine
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.javaRice Implementation296
org/kuali/rice/ken/web/spring/SendNotificationMessageController.javaRice Implementation299
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

        return new ModelAndView(view, model);
    }

    /**
     * This method creates a new Notification instance from the form values.
     * @param request
     * @param model
     * @return Notification
     * @throws IllegalArgumentException
     */
    private Notification populateNotificationInstance(
            HttpServletRequest request, Map<String, Object> model)
            throws IllegalArgumentException, ErrorList {
        ErrorList errors = new ErrorList();

        Notification notification = new Notification();

        // grab data from form
        // channel name
        String channelName = request.getParameter("channelName");
        if (StringUtils.isEmpty(channelName) || StringUtils.equals(channelName, NONE_CHANNEL)) {
            errors.addError("You must choose a channel.");
        } else {
            model.put("channelName", channelName);
        }

        // priority name
        String priorityName = request.getParameter("priorityName");
        if (StringUtils.isEmpty(priorityName)) {
            errors.addError("You must choose a priority.");
        } else {
            model.put("priorityName", priorityName);
        }

        // sender names
        String senderNames = request.getParameter("senderNames");
        String[] senders = null;
        if (StringUtils.isEmpty(senderNames)) {
            errors.addError("You must enter at least one sender.");
        } else {
            senders = StringUtils.split(senderNames, ",");

            model.put("senderNames", senderNames);
        }

        // delivery type
        String deliveryType = request.getParameter("deliveryType");
        if (StringUtils.isEmpty(deliveryType)) {
            errors.addError("You must choose a type.");
        } else {
            if (deliveryType
                    .equalsIgnoreCase(NotificationConstants.DELIVERY_TYPES.FYI)) {
                deliveryType = NotificationConstants.DELIVERY_TYPES.FYI;
            } else {
                deliveryType = NotificationConstants.DELIVERY_TYPES.ACK;
            }
            model.put("deliveryType", deliveryType);
        }

        // get datetime when form was initially rendered
        String originalDateTime = request.getParameter("originalDateTime");
        Date origdate = null;
        Date senddate = null;
        Date removedate = null;
        try {
            origdate = Util.parseUIDateTime(originalDateTime);
        } catch (ParseException pe) {
            errors.addError("Original date is invalid.");
        }
        // send date time
        String sendDateTime = request.getParameter("sendDateTime");
        if (StringUtils.isBlank(sendDateTime)) {
            sendDateTime = Util.getCurrentDateTime();
        }

        try {
            senddate = Util.parseUIDateTime(sendDateTime);
        } catch (ParseException pe) {
            errors.addError("You specified an invalid Send Date/Time.  Please use the calendar picker.");
        }

        if (senddate != null && senddate.before(origdate)) {
            errors.addError("Send Date/Time cannot be in the past.");
        }

        model.put("sendDateTime", sendDateTime);

        // auto remove date time
        String autoRemoveDateTime = request.getParameter("autoRemoveDateTime");
        if (StringUtils.isNotBlank(autoRemoveDateTime)) {
            try {
                removedate = Util.parseUIDateTime(autoRemoveDateTime);
            } catch (ParseException pe) {
                errors.addError("You specified an invalid Auto-Remove Date/Time.  Please use the calendar picker.");
            }

            if (removedate != null) {
                if (removedate.before(origdate)) {
                    errors.addError("Auto-Remove Date/Time cannot be in the past.");
                } else if (senddate != null && removedate.before(senddate)) {
                    errors.addError("Auto-Remove Date/Time cannot be before the Send Date/Time.");
                }
            }
        }

        model.put("autoRemoveDateTime", autoRemoveDateTime);

        // user recipient names
        String[] userRecipients = parseUserRecipients(request);

        // workgroup recipient names
        String[] workgroupRecipients = parseWorkgroupRecipients(request);

        // workgroup namespace codes
        String[] workgroupNamespaceCodes = parseWorkgroupNamespaceCodes(request);

        // title
        String title = request.getParameter("title");
        if (!StringUtils.isEmpty(title)) {
            model.put("title", title);
        } else {
            errors.addError("You must fill in a title");
        }

        // message
        String message = request.getParameter("message");
        if (StringUtils.isEmpty(message)) {
            errors.addError("You must fill in a message.");
        } else {
            model.put("message", message);
        }
FileProjectLine
org/kuali/rice/kns/service/impl/SessionDocumentServiceImpl.javaRice Implementation109
org/kuali/rice/krad/service/impl/SessionDocumentServiceImpl.javaRice Implementation111
            documentForm = (DocumentFormBase) retrieveDocumentForm(userSession, docFormKey, documentNumber, ipAddress);

            //re-store workFlowDocument into session
            WorkflowDocument workflowDocument =
                    documentForm.getDocument().getDocumentHeader().getWorkflowDocument();
            addDocumentToUserSession(userSession, workflowDocument);
        } catch (Exception e) {
            LOG.error("getDocumentForm failed for SessId/DocNum/PrinId/IP:" + userSession.getKualiSessionId() + "/" +
                    documentNumber + "/" + userSession.getPrincipalId() + "/" + ipAddress, e);
        }

        return documentForm;
    }

    protected Object retrieveDocumentForm(UserSession userSession, String sessionId, String documentNumber,
            String ipAddress) throws Exception {
        HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
        primaryKeys.put(SESSION_ID, sessionId);
        if (documentNumber != null) {
            primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
        }
        primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
        primaryKeys.put(IP_ADDRESS, ipAddress);

        SessionDocument sessionDoc = getBusinessObjectService().findByPrimaryKey(SessionDocument.class, primaryKeys);
        if (sessionDoc != null) {
            byte[] formAsBytes = sessionDoc.getSerializedDocumentForm();
            if (sessionDoc.isEncrypted()) {
                formAsBytes = getEncryptionService().decryptBytes(formAsBytes);
            }
            ByteArrayInputStream baip = new ByteArrayInputStream(formAsBytes);
            ObjectInputStream ois = new ObjectInputStream(baip);

            return ois.readObject();
        }

        return null;
    }

    @Override
    public WorkflowDocument getDocumentFromSession(UserSession userSession, String docId) {
        @SuppressWarnings("unchecked") Map<String, WorkflowDocument> workflowDocMap =
                (Map<String, WorkflowDocument>) userSession
                        .retrieveObject(KEWConstants.WORKFLOW_DOCUMENT_MAP_ATTR_NAME);

        if (workflowDocMap == null) {
            workflowDocMap = new HashMap<String, WorkflowDocument>();
            userSession.addObject(KEWConstants.WORKFLOW_DOCUMENT_MAP_ATTR_NAME, workflowDocMap);
            return null;
        }
        return workflowDocMap.get(docId);
    }

    /**
     * @see org.kuali.rice.krad.service.SessionDocumentService#addDocumentToUserSession(org.kuali.rice.krad.UserSession,
     *      org.kuali.rice.krad.workflow.service.KualiWorkflowDocument)
     */
    @Override
    public void addDocumentToUserSession(UserSession userSession, WorkflowDocument document) {
        @SuppressWarnings("unchecked") Map<String, WorkflowDocument> workflowDocMap =
                (Map<String, WorkflowDocument>) userSession
                        .retrieveObject(KEWConstants.WORKFLOW_DOCUMENT_MAP_ATTR_NAME);
        if (workflowDocMap == null) {
            workflowDocMap = new HashMap<String, WorkflowDocument>();
        }
        workflowDocMap.put(document.getDocumentId(), document);
        userSession.addObject(KEWConstants.WORKFLOW_DOCUMENT_MAP_ATTR_NAME, workflowDocMap);
    }

    /**
     * @see org.kuali.rice.krad.service.SessionDocumentService#purgeDocumentForm(String
     *      documentNumber, String docFormKey, UserSession userSession)
     */
    @Override
    public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress) {
        synchronized (userSession) {

            LOG.debug("purge document form from session");
            userSession.removeObject(docFormKey);
            try {
                LOG.debug("purge document form from database");
                HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
                primaryKeys.put(SESSION_ID, userSession.getKualiSessionId());
                primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
                primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
                primaryKeys.put(IP_ADDRESS, ipAddress);
                getBusinessObjectService().deleteMatching(SessionDocument.class, primaryKeys);
            } catch (Exception e) {
                LOG.error("purgeDocumentForm failed for SessId/DocNum/PrinId/IP:" + userSession.getKualiSessionId() +
                        "/" + documentNumber + "/" + userSession.getPrincipalId() + "/" + ipAddress, e);
            }
        }
    }

    /**
     * @see org.kuali.rice.krad.service.SessionDocumentService#setDocumentForm(org.kuali.rice.krad.web.form.DocumentFormBase,
     *      org.kuali.rice.krad.UserSession, java.lang.String)
     */
    @Override
    public void setDocumentForm(DocumentFormBase form, UserSession userSession, String ipAddress) {
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation98
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation92
    private static final String BACK_LOCATION = "backLocation";
    private static final String DOC_FORM_KEY = "docFormKey";
    private static final String INVALID_WORKGROUP_ERROR = "The Group Reviewer Namespace and Name combination is not valid";
    private static final String INVALID_PERSON_ERROR = "The Person Reviewer is not valid";

    @Override
	public List<Row> getRows() {
        List<Row> superRows = super.getRows();
        List<Row> returnRows = new ArrayList<Row>();
        returnRows.addAll(superRows);
        returnRows.addAll(rows);
        return returnRows;
    }

    @Override
    public boolean checkForAdditionalFields(Map fieldValues) {
        String ruleTemplateNameParam = (String) fieldValues.get(RULE_TEMPLATE_PROPERTY_NAME);

        if (ruleTemplateNameParam != null && !ruleTemplateNameParam.equals("")) {
            rows = new ArrayList<Row>();
            RuleTemplate ruleTemplate = null;

            ruleTemplate = getRuleTemplateService().findByRuleTemplateName(ruleTemplateNameParam);

            for (Object element : ruleTemplate.getActiveRuleTemplateAttributes()) {
                RuleTemplateAttribute ruleTemplateAttribute = (RuleTemplateAttribute) element;
                if (!ruleTemplateAttribute.isWorkflowAttribute()) {
                    continue;
                }
                WorkflowAttribute attribute = ruleTemplateAttribute.getWorkflowAttribute();
                RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
                if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) {
                    ((GenericXMLRuleAttribute) attribute).setRuleAttribute(ruleAttribute);
                }
                // run through the attributes fields once to populate field values we have to do this
                // to allow rows dependent on another row value to populate correctly in the loop below
                List<Row> searchRows = null;
                if (attribute instanceof OddSearchAttribute) {
                    searchRows = ((OddSearchAttribute) attribute).getSearchRows();
                } else {
                    searchRows = attribute.getRuleRows();
                }
                for (Row row : searchRows) {
                    List<Field> fields = new ArrayList<Field>();
                    for (Field field2 : row.getFields()) {
                        Field field = field2;
                        if (fieldValues.get(field.getPropertyName()) != null) {
                            field.setPropertyValue(fieldValues.get(field.getPropertyName()));
                        }
                        fields.add(field);
                        fieldValues.put(field.getPropertyName(), field.getPropertyValue());
                    }
                }

                if (attribute instanceof OddSearchAttribute) {
                    ((OddSearchAttribute) attribute).validateSearchData(fieldValues);
                } else {
                    attribute.validateRuleData(fieldValues);// populate attribute
                }

                if (attribute instanceof OddSearchAttribute) {
                    searchRows = ((OddSearchAttribute) attribute).getSearchRows();
                } else {
                    searchRows = attribute.getRuleRows();
                }
                for (Object element2 : searchRows) {
                    Row row = (Row) element2;
                    List<Field> fields = new ArrayList<Field>();
                    for (Field field : row.getFields()) {
                        if (fieldValues.get(field.getPropertyName()) != null) {
                            field.setPropertyValue(fieldValues.get(field.getPropertyName()));
                        }
                        fields.add(field);
                        fieldValues.put(field.getPropertyName(), field.getPropertyValue());
                    }
                    row.setFields(fields);
                    rows.add(row);

                }

            }

            return true;
        }
        rows.clear();
        return false;
    }

    @Override
    public List<? extends BusinessObject> getSearchResults(Map<String, String> fieldValues) {
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation2211
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.javaRice LDAP Connector390
	}
    
    protected List<RoleMemberBo> getRoleMembers(IdentityManagementRoleDocument identityManagementRoleDocument, List<RoleMemberBo> origRoleMembers){
        List<RoleMemberBo> roleMembers = new ArrayList<RoleMemberBo>();
        RoleMemberBo newRoleMember;
        RoleMemberBo origRoleMemberImplTemp;
        List<RoleMemberAttributeDataBo> origAttributes;
        boolean activatingInactive = false;
        String newRoleMemberIdAssigned = "";

        identityManagementRoleDocument.setKimType(KimApiServiceLocator.getKimTypeInfoService().getKimType(identityManagementRoleDocument.getRoleTypeId()));
        KimTypeService kimTypeService = KimFrameworkServiceLocator.getKimTypeService(identityManagementRoleDocument.getKimType());

        if(CollectionUtils.isNotEmpty(identityManagementRoleDocument.getMembers())){
            for(KimDocumentRoleMember documentRoleMember: identityManagementRoleDocument.getMembers()){
                origRoleMemberImplTemp = null;

                newRoleMember = new RoleMemberBo();
                KimCommonUtilsInternal.copyProperties(newRoleMember, documentRoleMember);
                newRoleMember.setRoleId(identityManagementRoleDocument.getRoleId());
                if(ObjectUtils.isNotNull(origRoleMembers)){
                    for(RoleMemberBo origRoleMemberImpl: origRoleMembers){
                        if((origRoleMemberImpl.getRoleId()!=null && StringUtils.equals(origRoleMemberImpl.getRoleId(), newRoleMember.getRoleId())) &&
                            (origRoleMemberImpl.getMemberId()!=null && StringUtils.equals(origRoleMemberImpl.getMemberId(), newRoleMember.getMemberId())) &&
                            (origRoleMemberImpl.getMemberTypeCode()!=null && StringUtils.equals(origRoleMemberImpl.getMemberTypeCode(), newRoleMember.getMemberTypeCode())) &&
                            !origRoleMemberImpl.isActive(new Timestamp(System.currentTimeMillis())) &&
                            !kimTypeService.validateAttributesAgainstExisting(identityManagementRoleDocument.getKimType().getId(),
                                    documentRoleMember.getQualifierAsMap(), origRoleMemberImpl.getAttributes()).isEmpty()) {

                            //TODO: verify if you want to add  && newRoleMember.isActive() condition to if...

                            newRoleMemberIdAssigned = newRoleMember.getRoleMemberId();
                            newRoleMember.setRoleMemberId(origRoleMemberImpl.getRoleMemberId());
                            activatingInactive = true;
                        }
                        if(origRoleMemberImpl.getRoleMemberId()!=null && StringUtils.equals(origRoleMemberImpl.getRoleMemberId(), newRoleMember.getRoleMemberId())){
                            newRoleMember.setVersionNumber(origRoleMemberImpl.getVersionNumber());
                            origRoleMemberImplTemp = origRoleMemberImpl;
                        }
                    }
                }
                origAttributes = (origRoleMemberImplTemp==null || origRoleMemberImplTemp.getAttributes()==null)?
                                    new ArrayList<RoleMemberAttributeDataBo>():origRoleMemberImplTemp.getAttributeDetails();
                newRoleMember.setActiveFromDateValue(documentRoleMember.getActiveFromDate());
                newRoleMember.setActiveToDateValue(documentRoleMember.getActiveToDate());
                newRoleMember.setAttributeDetails(getRoleMemberAttributeData(documentRoleMember.getQualifiers(), origAttributes, activatingInactive, newRoleMemberIdAssigned));
                newRoleMember.setRoleRspActions(getRoleMemberResponsibilityActions(documentRoleMember, origRoleMemberImplTemp, activatingInactive, newRoleMemberIdAssigned));
                roleMembers.add(newRoleMember);
                activatingInactive = false;
            }
        }
        return roleMembers;
    }
FileProjectLine
org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.javaRice KNS362
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.javaRice KRAD Web Framework324
            if (getDataObjectAuthorizationService().attributeValueNeedsToBeEncryptedOnFormsAndLinks(
                    inactivationBlockingMetadata.getBlockedBusinessObjectClass(), keyName)){
                try {
                    keyValue = CoreApiServiceLocator.getEncryptionService().encrypt(keyValue);
                } catch (GeneralSecurityException e) {
                    LOG.error("Exception while trying to encrypted value for inquiry framework.", e);
                    throw new RuntimeException(e);
                }
            }

            parameters.put(keyName, keyValue);
        }

        String blockingUrl =
                UrlFactory.parameterizeUrl(KRADConstants.DISPLAY_ALL_INACTIVATION_BLOCKERS_ACTION, parameters);

        // post an error about the locked document
        GlobalVariables.getMessageMap()
                .putError(KRADConstants.GLOBAL_ERRORS, RiceKeyConstants.ERROR_INACTIVATION_BLOCKED, blockingUrl);
    }

    /**
     * @see org.kuali.rice.krad.maintenance.rules.MaintenanceDocumentRule#processApproveDocument(ApproveDocumentEvent)
     */
    @Override
    public boolean processApproveDocument(ApproveDocumentEvent approveEvent) {
        MaintenanceDocument maintenanceDocument = (MaintenanceDocument) approveEvent.getDocument();

        // remove all items from the errorPath temporarily (because it may not
        // be what we expect, or what we need)
        clearErrorPath();

        // setup convenience pointers to the old & new bo
        setupBaseConvenienceObjects(maintenanceDocument);

        // apply rules that are common across all maintenance documents, regardless of class
        processGlobalSaveDocumentBusinessRules(maintenanceDocument);

        // from here on, it is in a default-success mode, and will approve unless one of the
        // business rules stop it.
        boolean success = true;

        // apply rules that are common across all maintenance documents, regardless of class
        success &= processGlobalApproveDocumentBusinessRules(maintenanceDocument);

        // apply rules that are specific to the class of the maintenance document
        // (if implemented). this will always succeed if not overloaded by the
        // subclass
        success &= processCustomApproveDocumentBusinessRules(maintenanceDocument);

        // return the original set of items to the errorPath, to ensure no impact
        // on other upstream or downstream items that rely on the errorPath
        resumeErrorPath();

        return success;
    }

    /**
     * This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field,
     * but
     * applicable to the whole document).
     *
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     */
    protected void putGlobalError(String errorConstant) {
        if (!errorAlreadyExists(KRADConstants.DOCUMENT_ERRORS, errorConstant)) {
            GlobalVariables.getMessageMap().putErrorWithoutFullErrorPath(KRADConstants.DOCUMENT_ERRORS, errorConstant);
        }
    }

    /**
     * This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field,
     * but
     * applicable to the whole document).
     *
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     * @param parameter - Replacement value for part of the error message.
     */
    protected void putGlobalError(String errorConstant, String parameter) {
        if (!errorAlreadyExists(KRADConstants.DOCUMENT_ERRORS, errorConstant)) {
            GlobalVariables.getMessageMap()
                    .putErrorWithoutFullErrorPath(KRADConstants.DOCUMENT_ERRORS, errorConstant, parameter);
        }
    }

    /**
     * This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field,
     * but
     * applicable to the whole document).
     *
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     * @param parameters - Array of replacement values for part of the error message.
     */
    protected void putGlobalError(String errorConstant, String[] parameters) {
        if (!errorAlreadyExists(KRADConstants.DOCUMENT_ERRORS, errorConstant)) {
            GlobalVariables.getMessageMap()
                    .putErrorWithoutFullErrorPath(KRADConstants.DOCUMENT_ERRORS, errorConstant, parameters);
        }
    }

    /**
     * This method is a convenience method to add a property-specific error to the global errors list. This method
     * makes
     * sure that
     * the correct prefix is added to the property name so that it will display correctly on maintenance documents.
     *
     * @param propertyName - Property name of the element that is associated with the error. Used to mark the field as
     * errored in
     * the UI.
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     */
    protected void putFieldError(String propertyName, String errorConstant) {
        if (!errorAlreadyExists(MAINTAINABLE_ERROR_PREFIX + propertyName, errorConstant)) {
            GlobalVariables.getMessageMap()
                    .putErrorWithoutFullErrorPath(MAINTAINABLE_ERROR_PREFIX + propertyName, errorConstant);
        }
    }

    /**
     * This method is a convenience method to add a property-specific error to the global errors list. This method
     * makes
     * sure that
     * the correct prefix is added to the property name so that it will display correctly on maintenance documents.
     *
     * @param propertyName - Property name of the element that is associated with the error. Used to mark the field as
     * errored in
     * the UI.
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     * @param parameter - Single parameter value that can be used in the message so that you can display specific
     * values
     * to the
     * user.
     */
    protected void putFieldError(String propertyName, String errorConstant, String parameter) {
        if (!errorAlreadyExists(MAINTAINABLE_ERROR_PREFIX + propertyName, errorConstant)) {
            GlobalVariables.getMessageMap()
                    .putErrorWithoutFullErrorPath(MAINTAINABLE_ERROR_PREFIX + propertyName, errorConstant, parameter);
        }
    }

    /**
     * This method is a convenience method to add a property-specific error to the global errors list. This method
     * makes
     * sure that
     * the correct prefix is added to the property name so that it will display correctly on maintenance documents.
     *
     * @param propertyName - Property name of the element that is associated with the error. Used to mark the field as
     * errored in
     * the UI.
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     * @param parameters - Array of strings holding values that can be used in the message so that you can display
     * specific values
     * to the user.
     */
    protected void putFieldError(String propertyName, String errorConstant, String[] parameters) {
        if (!errorAlreadyExists(MAINTAINABLE_ERROR_PREFIX + propertyName, errorConstant)) {
            GlobalVariables.getMessageMap()
                    .putErrorWithoutFullErrorPath(MAINTAINABLE_ERROR_PREFIX + propertyName, errorConstant, parameters);
        }
    }

    /**
     * Adds a property-specific error to the global errors list, with the DD short label as the single argument.
     *
     * @param propertyName - Property name of the element that is associated with the error. Used to mark the field as
     * errored in
     * the UI.
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     */
    protected void putFieldErrorWithShortLabel(String propertyName, String errorConstant) {
        String shortLabel = getDataDictionaryService().getAttributeShortLabel(dataObjectClass, propertyName);
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation802
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.javaRice LDAP Connector180
	}

	protected List<PersonDocumentAffiliation> loadAffiliations(List <EntityAffiliation> affiliations, List<EntityEmployment> empInfos) {
		List<PersonDocumentAffiliation> docAffiliations = new ArrayList<PersonDocumentAffiliation>();
		if(ObjectUtils.isNotNull(affiliations)){
			for (EntityAffiliation affiliation: affiliations) {
				if(affiliation.isActive()){
					PersonDocumentAffiliation docAffiliation = new PersonDocumentAffiliation();
					docAffiliation.setAffiliationTypeCode(affiliation.getAffiliationType().getCode());
					docAffiliation.setCampusCode(affiliation.getCampusCode());
					docAffiliation.setActive(affiliation.isActive());
					docAffiliation.setDflt(affiliation.isDefaultValue());
					docAffiliation.setEntityAffiliationId(affiliation.getId());
					docAffiliation.refreshReferenceObject("affiliationType");
					// EntityAffiliationImpl does not define empinfos as collection
					docAffiliations.add(docAffiliation);
					docAffiliation.setEdit(true);
					// employment informations
					List<PersonDocumentEmploymentInfo> docEmploymentInformations = new ArrayList<PersonDocumentEmploymentInfo>();
					if(ObjectUtils.isNotNull(empInfos)){
						for (EntityEmployment empInfo: empInfos) {
							if (empInfo.isActive()
                                    && StringUtils.equals(docAffiliation.getEntityAffiliationId(),
                                                          (empInfo.getEntityAffiliation() != null ? empInfo.getEntityAffiliation().getId() : null))) {
								PersonDocumentEmploymentInfo docEmpInfo = new PersonDocumentEmploymentInfo();
								docEmpInfo.setEntityEmploymentId(empInfo.getEmployeeId());
								docEmpInfo.setEmployeeId(empInfo.getEmployeeId());
								docEmpInfo.setEmploymentRecordId(empInfo.getEmploymentRecordId());
								docEmpInfo.setBaseSalaryAmount(empInfo.getBaseSalaryAmount());
								docEmpInfo.setPrimaryDepartmentCode(empInfo.getPrimaryDepartmentCode());
								docEmpInfo.setEmploymentStatusCode(empInfo.getEmployeeStatus() != null ? empInfo.getEmployeeStatus().getCode() : null);
								docEmpInfo.setEmploymentTypeCode(empInfo.getEmployeeType() != null ? empInfo.getEmployeeType().getCode() : null);
								docEmpInfo.setActive(empInfo.isActive());
								docEmpInfo.setPrimary(empInfo.isPrimary());
								docEmpInfo.setEntityAffiliationId(empInfo.getEntityAffiliation() != null ? empInfo.getEntityAffiliation().getId() : null);
								// there is no version number on KimEntityEmploymentInformationInfo
								//docEmpInfo.setVersionNumber(empInfo.getVersionNumber());
								docEmpInfo.setEdit(true);
								docEmpInfo.refreshReferenceObject("employmentType");
								docEmploymentInformations.add(docEmpInfo);
							}
						}
					}
					docAffiliation.setEmpInfos(docEmploymentInformations);
				}
			}
		}
		return docAffiliations;

	}

    
    protected List<PersonDocumentName> loadNames( IdentityManagementPersonDocument personDoc, String principalId, List <EntityName> names, boolean suppressDisplay ) {
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation287
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.javaRice LDAP Connector77
	public void loadEntityToPersonDoc(IdentityManagementPersonDocument identityManagementPersonDocument, String principalId) {
		Principal principal = this.getIdentityService().getPrincipal(principalId);
        if(principal==null) {
        	throw new RuntimeException("Principal does not exist for principal id:"+principalId);
        }

        identityManagementPersonDocument.setPrincipalId(principal.getPrincipalId());
        identityManagementPersonDocument.setPrincipalName(principal.getPrincipalName());
        identityManagementPersonDocument.setPassword(principal.getPassword());
        identityManagementPersonDocument.setActive(principal.isActive());
        Entity kimEntity = this.getIdentityService().getEntity(principal.getEntityId());
		identityManagementPersonDocument.setEntityId(kimEntity.getId());
		if ( ObjectUtils.isNotNull( kimEntity.getPrivacyPreferences() ) ) {
			identityManagementPersonDocument.setPrivacy(loadPrivacyReferences(kimEntity.getPrivacyPreferences()));
		}
		//identityManagementPersonDocument.setActive(kimEntity.isActive());
		identityManagementPersonDocument.setAffiliations(loadAffiliations(kimEntity.getAffiliations(),kimEntity.getEmploymentInformation()));
		identityManagementPersonDocument.setNames(loadNames( identityManagementPersonDocument, principalId, kimEntity.getNames(), identityManagementPersonDocument.getPrivacy().isSuppressName() ));
		EntityTypeContactInfo entityType = null;
		for (EntityTypeContactInfo type : kimEntity.getEntityTypeContactInfos()) {
			if (KimConstants.EntityTypes.PERSON.equals(type.getEntityTypeCode())) {
				entityType = EntityTypeContactInfo.Builder.create(type).build();
			}
		}

		if(entityType!=null){
			identityManagementPersonDocument.setEmails(loadEmails(identityManagementPersonDocument, principalId, entityType.getEmailAddresses(), identityManagementPersonDocument.getPrivacy().isSuppressEmail()));
			identityManagementPersonDocument.setPhones(loadPhones(identityManagementPersonDocument, principalId, entityType.getPhoneNumbers(), identityManagementPersonDocument.getPrivacy().isSuppressPhone()));
			identityManagementPersonDocument.setAddrs(loadAddresses(identityManagementPersonDocument, principalId, entityType.getAddresses(), identityManagementPersonDocument.getPrivacy().isSuppressAddress()));
		}

		List<Group> groups = getGroupService().getGroups(getGroupService().getDirectGroupIdsForPrincipal(identityManagementPersonDocument.getPrincipalId()));
		loadGroupToPersonDoc(identityManagementPersonDocument, groups);
		loadRoleToPersonDoc(identityManagementPersonDocument);
		loadDelegationsToPersonDoc(identityManagementPersonDocument);
	}
FileProjectLine
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.javaRice Implementation492
org/kuali/rice/ken/web/spring/SendNotificationMessageController.javaRice Implementation453
                NotificationConstants.CONTENT_TYPES.SIMPLE_CONTENT_TYPE,
                NotificationContentType.class, businessObjectDao);
        notification.setContentType(contentType);

        NotificationProducer producer = Util
                .retrieveFieldReference(
                        "producer",
                        "name",
                        NotificationConstants.KEW_CONSTANTS.NOTIFICATION_SYSTEM_USER_NAME,
                        NotificationProducer.class, businessObjectDao);
        notification.setProducer(producer);

        for (String senderName : senders) {
            if (StringUtils.isEmpty(senderName)) {
                errors.addError("A sender's name cannot be blank.");
            } else {
                NotificationSender ns = new NotificationSender();
                ns.setSenderName(senderName.trim());
                notification.addSender(ns);
            }
        }

        boolean recipientsExist = false;

        if (userRecipients != null && userRecipients.length > 0) {
            recipientsExist = true;
            for (String userRecipientId : userRecipients) {
                if (isUserRecipientValid(userRecipientId, errors)) {
                    NotificationRecipient recipient = new NotificationRecipient();
                    recipient.setRecipientType(KimGroupMemberTypes.PRINCIPAL_MEMBER_TYPE);
                    recipient.setRecipientId(userRecipientId);
                    notification.addRecipient(recipient);
                }
            }
        }

        if (workgroupRecipients != null && workgroupRecipients.length > 0) {
            recipientsExist = true;
            if (workgroupNamespaceCodes != null && workgroupNamespaceCodes.length > 0) {
                if (workgroupNamespaceCodes.length == workgroupRecipients.length) {
                    for (int i = 0; i < workgroupRecipients.length; i++) {
                        if (isWorkgroupRecipientValid(workgroupRecipients[i], workgroupNamespaceCodes[i], errors)) {
                            NotificationRecipient recipient = new NotificationRecipient();
                            recipient.setRecipientType(KimGroupMemberTypes.GROUP_MEMBER_TYPE);
                            recipient.setRecipientId(
                                    getGroupService().getGroupByName(workgroupNamespaceCodes[i],
                                            workgroupRecipients[i]).getId());
                            notification.addRecipient(recipient);
                        }
                    }
                } else {
                    errors.addError("The number of groups must match the number of namespace codes");
                }
            } else {
                errors.addError("You must specify a namespace code for every group name");
            }
        } else if (workgroupNamespaceCodes != null && workgroupNamespaceCodes.length > 0) {
            errors.addError("You must specify a group name for every namespace code");
        }

        // check to see if there were any errors
        if (errors.getErrors().size() > 0) {
            throw errors;
        }

        notification.setTitle(title);

        notification.setDeliveryType(deliveryType);

        // simpledateformat is not threadsafe, have to sync and validate
        Date d = null;
FileProjectLine
org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.javaRice KNS529
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.javaRice KRAD Web Framework494
        String shortLabel = getDataDictionaryService().getAttributeShortLabel(dataObjectClass, propertyName);
        putFieldError(propertyName, errorConstant, shortLabel);
    }

    /**
     * This method is a convenience method to add a property-specific document error to the global errors list. This
     * method makes
     * sure that the correct prefix is added to the property name so that it will display correctly on maintenance
     * documents.
     *
     * @param propertyName - Property name of the element that is associated with the error. Used to mark the field as
     * errored in
     * the UI.
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     * @param parameter - Single parameter value that can be used in the message so that you can display specific
     * values
     * to the
     * user.
     */
    protected void putDocumentError(String propertyName, String errorConstant, String parameter) {
        if (!errorAlreadyExists(DOCUMENT_ERROR_PREFIX + propertyName, errorConstant)) {
            GlobalVariables.getMessageMap().putError(DOCUMENT_ERROR_PREFIX + propertyName, errorConstant, parameter);
        }
    }

    /**
     * This method is a convenience method to add a property-specific document error to the global errors list. This
     * method makes
     * sure that the correct prefix is added to the property name so that it will display correctly on maintenance
     * documents.
     *
     * @param propertyName - Property name of the element that is associated with the error. Used to mark the field as
     * errored in
     * the UI.
     * @param errorConstant - Error Constant that can be mapped to a resource for the actual text message.
     * @param parameters - Array of String parameters that can be used in the message so that you can display specific
     * values to the
     * user.
     */
    protected void putDocumentError(String propertyName, String errorConstant, String[] parameters) {
        GlobalVariables.getMessageMap().putError(DOCUMENT_ERROR_PREFIX + propertyName, errorConstant, parameters);
    }

    /**
     * Convenience method to determine whether the field already has the message indicated.
     *
     * This is useful if you want to suppress duplicate error messages on the same field.
     *
     * @param propertyName - propertyName you want to test on
     * @param errorConstant - errorConstant you want to test
     * @return returns True if the propertyName indicated already has the errorConstant indicated, false otherwise
     */
    protected boolean errorAlreadyExists(String propertyName, String errorConstant) {
        if (GlobalVariables.getMessageMap().fieldHasMessage(propertyName, errorConstant)) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * This method specifically doesn't put any prefixes before the error so that the developer can do things specific
     * to the
     * globals errors (like newDelegateChangeDocument errors)
     *
     * @param propertyName
     * @param errorConstant
     */
    protected void putGlobalsError(String propertyName, String errorConstant) {
        if (!errorAlreadyExists(propertyName, errorConstant)) {
            GlobalVariables.getMessageMap().putErrorWithoutFullErrorPath(propertyName, errorConstant);
        }
    }

    /**
     * This method specifically doesn't put any prefixes before the error so that the developer can do things specific
     * to the
     * globals errors (like newDelegateChangeDocument errors)
     *
     * @param propertyName
     * @param errorConstant
     * @param parameter
     */
    protected void putGlobalsError(String propertyName, String errorConstant, String parameter) {
        if (!errorAlreadyExists(propertyName, errorConstant)) {
            GlobalVariables.getMessageMap().putErrorWithoutFullErrorPath(propertyName, errorConstant, parameter);
        }
    }

    /**
     * This method is used to deal with error paths that are not what we expect them to be. This method, along with
     * resumeErrorPath() are used to temporarily clear the errorPath, and then return it to the original state after
     * the
     * rule is
     * executed.
     *
     * This method is called at the very beginning of rule enforcement and pulls a copy of the contents of the
     * errorPath
     * ArrayList
     * to a local arrayList for temporary storage.
     */
    protected void clearErrorPath() {
        // add all the items from the global list to the local list
        priorErrorPath.addAll(GlobalVariables.getMessageMap().getErrorPath());

        // clear the global list
        GlobalVariables.getMessageMap().getErrorPath().clear();
    }

    /**
     * This method is used to deal with error paths that are not what we expect them to be. This method, along with
     * clearErrorPath()
     * are used to temporarily clear the errorPath, and then return it to the original state after the rule is
     * executed.
     *
     * This method is called at the very end of the rule enforcement, and returns the temporarily stored copy of the
     * errorPath to
     * the global errorPath, so that no other classes are interrupted.
     */
    protected void resumeErrorPath() {
        // revert the global errorPath back to what it was when we entered this
        // class
        GlobalVariables.getMessageMap().getErrorPath().addAll(priorErrorPath);
    }

    /**
     * Executes the DataDictionary Validation against the document.
     *
     * @param document
     * @return true if it passes DD validation, false otherwise
     */
    protected boolean dataDictionaryValidate(MaintenanceDocument document) {
        LOG.debug("MaintenanceDocument validation beginning");

        // explicitly put the errorPath that the dictionaryValidationService
        // requires
        GlobalVariables.getMessageMap().addToErrorPath("document.newMaintainableObject");

        // document must have a newMaintainable object
        Maintainable newMaintainable = document.getNewMaintainableObject();
        if (newMaintainable == null) {
            GlobalVariables.getMessageMap().removeFromErrorPath("document.newMaintainableObject");
            throw new ValidationException(
                    "Maintainable object from Maintenance Document '" + document.getDocumentTitle() +
                            "' is null, unable to proceed.");
        }

        // document's newMaintainable must contain an object (ie, not null)
        Object dataObject = newMaintainable.getDataObject();
        if (dataObject == null) {
            GlobalVariables.getMessageMap().removeFromErrorPath("document.newMaintainableObject.");
            throw new ValidationException("Maintainable's component business object is null.");
        }
FileProjectLine
org/kuali/rice/kns/service/impl/SessionDocumentServiceImpl.javaRice Implementation244
org/kuali/rice/krad/service/impl/SessionDocumentServiceImpl.javaRice Implementation243
            }

            if (encryptContent) {
                formAsBytes = getEncryptionService().encryptBytes(formAsBytes);
            }

            // check if a record is already there in the database
            // this may only happen under jMeter testing, but there is no way to be sure
            HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
            primaryKeys.put(SESSION_ID, sessionId);
            primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
            primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
            primaryKeys.put(IP_ADDRESS, ipAddress);

            SessionDocument sessionDocument =
                    getBusinessObjectService().findByPrimaryKey(SessionDocument.class, primaryKeys);
            if (sessionDocument == null) {
                sessionDocument = new SessionDocument();
                sessionDocument.setSessionId(sessionId);
                sessionDocument.setDocumentNumber(documentNumber);
                sessionDocument.setPrincipalId(userSession.getPrincipalId());
                sessionDocument.setIpAddress(ipAddress);
            }
            sessionDocument.setSerializedDocumentForm(formAsBytes);
            sessionDocument.setEncrypted(encryptContent);
            sessionDocument.setLastUpdatedDate(currentTime);

            businessObjectService.save(sessionDocument);
        } catch (Exception e) {
            final String className = form != null ? form.getClass().getName() : "null";
            LOG.error("setDocumentForm failed for SessId/DocNum/PrinId/IP/class:" + userSession.getKualiSessionId() +
                    "/" + documentNumber + "/" + userSession.getPrincipalId() + "/" + ipAddress + "/" + className, e);
        }
    }

    /**
     * @see org.kuali.rice.krad.service.SessionDocumentService#purgeAllSessionDocuments(java.sql.Timestamp)
     */
    @Override
    public void purgeAllSessionDocuments(Timestamp expirationDate) {
        sessionDocumentDao.purgeAllSessionDocuments(expirationDate);
    }

    protected SessionDocumentDao getSessionDocumentDao() {
        return this.sessionDocumentDao;
    }

    public void setSessionDocumentDao(SessionDocumentDao sessionDocumentDao) {
        this.sessionDocumentDao = sessionDocumentDao;
    }

    protected BusinessObjectService getBusinessObjectService() {
        return this.businessObjectService;
    }

    public void setBusinessObjectService(BusinessObjectService businessObjectService) {
        this.businessObjectService = businessObjectService;
    }

    public int getMaxCacheSize() {
        return maxCacheSize;
    }

    public void setMaxCacheSize(int maxCacheSize) {
        this.maxCacheSize = maxCacheSize;
    }

    protected EncryptionService getEncryptionService() {
        if (encryptionService == null) {
            encryptionService = CoreApiServiceLocator.getEncryptionService();
        }
        return encryptionService;
    }

    protected DataDictionaryService getDataDictionaryService() {
        if (dataDictionaryService == null) {
            dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService();
        }
        return dataDictionaryService;
    }
}
FileProjectLine
org/kuali/rice/kew/docsearch/SearchableAttributeFloatValue.javaRice Implementation135
org/kuali/rice/kew/docsearch/SearchableAttributeLongValue.javaRice Implementation134
        return format.format(getSearchableAttributeValue().longValue());
    }

	/* (non-Javadoc)
	 * @see org.kuali.rice.kew.docsearch.SearchableAttributeValue#getAttributeDataType()
	 */
	public String getAttributeDataType() {
		return ATTRIBUTE_XML_REPRESENTATION;
	}

	/* (non-Javadoc)
	 * @see org.kuali.rice.kew.docsearch.SearchableAttributeValue#getAttributeTableName()
	 */
	public String getAttributeTableName() {
		return ATTRIBUTE_DATABASE_TABLE_NAME;
	}

    /* (non-Javadoc)
	 * @see org.kuali.rice.kew.docsearch.SearchableAttributeValue#allowsWildcardsByDefault()
	 */
	public boolean allowsWildcards() {
		return DEFAULT_WILDCARD_ALLOWANCE_POLICY;
	}

    /* (non-Javadoc)
	 * @see org.kuali.rice.kew.docsearch.SearchableAttributeValue#allowsCaseInsensitivity()
	 */
	public boolean allowsCaseInsensitivity() {
		return ALLOWS_CASE_INSENSITIVE_SEARCH;
	}

    /* (non-Javadoc)
	 * @see org.kuali.rice.kew.docsearch.SearchableAttributeValue#allowsRangeSearches()
	 */
	public boolean allowsRangeSearches() {
		return ALLOWS_RANGE_SEARCH;
	}

	/* (non-Javadoc)
	 * @see org.kuali.rice.kew.docsearch.SearchableAttributeValue#isPassesDefaultValidation()
	 */
	public boolean isPassesDefaultValidation(String valueEntered) {

    	boolean bRet = true;
    	boolean bSplit = false;

		if (StringUtils.contains(valueEntered, SearchOperator.BETWEEN.op())) {
			List<String> l = Arrays.asList(valueEntered.split("\\.\\."));
			for(String value : l){
				bSplit = true;
				if(!isPassesDefaultValidation(value)){
					bRet = false;
				}
			}
		}
		if (StringUtils.contains(valueEntered, SearchOperator.OR.op())) {
			//splitValueList.addAll(Arrays.asList(StringUtils.split(valueEntered, KRADConstants.OR_LOGICAL_OPERATOR)));
			List<String> l = Arrays.asList(StringUtils.split(valueEntered, SearchOperator.OR.op()));
			for(String value : l){
				bSplit = true;
				if(!isPassesDefaultValidation(value)){
					bRet = false;
				}
			}
		}
		if (StringUtils.contains(valueEntered, SearchOperator.AND.op())) {
			//splitValueList.addAll(Arrays.asList(StringUtils.split(valueEntered, KRADConstants.AND_LOGICAL_OPERATOR)));
			List<String> l = Arrays.asList(StringUtils.split(valueEntered, SearchOperator.AND.op()));
			for(String value : l){
				bSplit = true;
				if(!isPassesDefaultValidation(value)){
					bRet = false;
				}
			}
		}

		if(bSplit){
			return bRet;
		}

		Pattern pattern = Pattern.compile(DEFAULT_VALIDATION_REGEX_EXPRESSION);
		Matcher matcher = pattern.matcher(SQLUtils.cleanNumericOfValidOperators(valueEntered).trim());
		if(!matcher.matches()){
			bRet = false;
		}

		return bRet;

    }


    /* (non-Javadoc)
     * @see org.kuali.rice.kew.docsearch.SearchableAttributeValue#isRangeValid(java.lang.String, java.lang.String)
     */
    public Boolean isRangeValid(String lowerValue, String upperValue) {
        if (allowsRangeSearches()) {
FileProjectLine
org/kuali/rice/kim/api/permission/Permission.javaRice KIM API246
org/kuali/rice/kim/api/responsibility/Responsibility.javaRice KIM API243
            return builder;
        }

        @Override
        public String getId() {
            return id;
        }

        public void setId(final String id) {
        	this.id = id;
        }
        
        @Override
        public String getNamespaceCode() {
            return namespaceCode;
        }

        public void setNamespaceCode(final String namespaceCode) {
        	if (StringUtils.isBlank(namespaceCode)) {
                throw new IllegalArgumentException("namespaceCode is blank");
            }
        	this.namespaceCode = namespaceCode;
        }

        @Override
        public String getName() {
            return name;
        }

        public void setName(final String name) {
        	if (StringUtils.isBlank(name)) {
                throw new IllegalArgumentException("name is blank");
            }
        	this.name = name;
        }

		@Override
		public String getDescription() {
			return description;
		}
		
		public void setDescription(final String description) {
			this.description = description;
		}

		@Override
		public Template.Builder getTemplate() {
			return template;
		}
		
		public void setTemplate(final Template.Builder template) {
			if (template == null) {
                throw new IllegalArgumentException("template is null");
            }
			this.template = template;
		}
		
		@Override
		public boolean isActive() {
			return active;
		}
		
		public void setActive(final boolean active) {
            this.active = active;
        }

		@Override
		public Long getVersionNumber() {
			return versionNumber;
		}

		public void setVersionNumber(final Long versionNumber) {
			if (versionNumber == null || versionNumber <= 0) {
	            throw new IllegalArgumentException("versionNumber is invalid");
	        }
			this.versionNumber = versionNumber;
	    }
		 
		@Override
		public String getObjectId() {
			return objectId;
		}

        public void setObjectId(final String objectId) {
            this.objectId = objectId;
        }

		@Override
		public Map<String, String> getAttributes() {
			return attributes;
		}
		
		public void setAttributes(Map<String, String> attributes) {
            this.attributes = Collections.unmodifiableMap(Maps.newHashMap(attributes));
        }
		
        @Override
        public Responsibility build() {
FileProjectLine
org/kuali/rice/edl/framework/extract/DumpDTO.javaRice EDL Framework47
org/kuali/rice/edl/impl/extract/Dump.javaRice EDL Impl89
	public Timestamp getDocCreationDate() {
		return docCreationDate;
	}
	public void setDocCreationDate(final Timestamp docCreationDate) {
		this.docCreationDate = docCreationDate;
	}
	public String getDocCurrentNodeName() {
		return docCurrentNodeName;
	}
	public void setDocCurrentNodeName(final String docCurrentNodeName) {
		this.docCurrentNodeName = docCurrentNodeName;
	}
	public String getDocDescription() {
		return docDescription;
	}
	public void setDocDescription(final String docDescription) {
		this.docDescription = docDescription;
	}
	public String getDocId() {
		return docId;
	}
	public String getDocInitiatorId() {
		return docInitiatorId;
	}
	public void setDocInitiatorId(final String docInitiatorId) {
		this.docInitiatorId = docInitiatorId;
	}
	public Timestamp getDocModificationDate() {
		return docModificationDate;
	}
	public void setDocModificationDate(final Timestamp docModificationDate) {
		this.docModificationDate = docModificationDate;
	}
	public String getDocRouteStatusCode() {
		return docRouteStatusCode;
	}
	public void setDocRouteStatusCode(final String docRouteStatusCode) {
		this.docRouteStatusCode = docRouteStatusCode;
	}
	public String getDocTypeName() {
		return docTypeName;
	}
	public void setDocTypeName(final String docTypeName) {
		this.docTypeName = docTypeName;
	}
	public Integer getLockVerNbr() {
		return lockVerNbr;
	}
	public void setLockVerNbr(final Integer lockVerNbr) {
		this.lockVerNbr = lockVerNbr;
	}
    public String getFormattedCreateDateTime() {
        long time = getDocCreationDate().getTime();
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(time);
        Date date = calendar.getTime();
        DateFormat dateFormat = new SimpleDateFormat(KEWConstants.TIMESTAMP_DATE_FORMAT_PATTERN2);
        return dateFormat.format(date);
    }

    public String getFormattedCreateDate() {
        long time = getDocCreationDate().getTime();
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(time);
        Date date = calendar.getTime();
        DateFormat dateFormat = RiceConstants.getDefaultDateFormat();
        return dateFormat.format(date);
    }
	public void setDocId(final String docId) {
		this.docId = docId;
	}


	public List<Fields> getFields() {
FileProjectLine
org/kuali/rice/krad/document/authorization/MaintenanceDocumentAuthorizerBase.javaRice Implementation60
org/kuali/rice/krad/uif/authorization/MaintenanceDocumentAuthorizerBase.javaRice KRAD Web Framework56
                KRADServiceLocatorWeb.getDocumentDictionaryService()
                        .getMaintenanceDocumentTypeName(dataObject.getClass()));
        permissionDetails.put(KRADConstants.MAINTENANCE_ACTN, KRADConstants.MAINTENANCE_EDIT_ACTION);
        return !permissionExistsByTemplate(KRADConstants.KRAD_NAMESPACE,
                KimConstants.PermissionTemplateNames.CREATE_MAINTAIN_RECORDS, permissionDetails) ||
                isAuthorizedByTemplate(dataObject, KRADConstants.KRAD_NAMESPACE,
                        KimConstants.PermissionTemplateNames.CREATE_MAINTAIN_RECORDS, user.getPrincipalId(),
                        permissionDetails, null);
    }

    public final boolean canCreateOrMaintain(MaintenanceDocument maintenanceDocument, Person user) {
        return !permissionExistsByTemplate(maintenanceDocument, KRADConstants.KRAD_NAMESPACE,
                KimConstants.PermissionTemplateNames.CREATE_MAINTAIN_RECORDS) ||
                isAuthorizedByTemplate(maintenanceDocument, KRADConstants.KRAD_NAMESPACE,
                        KimConstants.PermissionTemplateNames.CREATE_MAINTAIN_RECORDS, user.getPrincipalId());
    }

    public Set<String> getSecurePotentiallyHiddenSectionIds() {
        return new HashSet<String>();
    }

    public Set<String> getSecurePotentiallyReadOnlySectionIds() {
        return new HashSet<String>();
    }

    @SuppressWarnings("unchecked")
    @Override
    protected void addRoleQualification(Object dataObject, Map<String, String> attributes) {
        super.addRoleQualification(dataObject, attributes);
        if (dataObject instanceof MaintenanceDocument) {
            MaintenanceDocument maintDoc = (MaintenanceDocument) dataObject;
            if (maintDoc.getNewMaintainableObject() != null) {
                attributes.putAll(KRADUtils
                        .getNamespaceAndComponentSimpleName(maintDoc.getNewMaintainableObject().getDataObjectClass()));
            }
        }
    }

    @SuppressWarnings("unchecked")
    @Override
    protected void addPermissionDetails(Object dataObject, Map<String, String> attributes) {
        super.addPermissionDetails(dataObject, attributes);
        if (dataObject instanceof MaintenanceDocument) {
            MaintenanceDocument maintDoc = (MaintenanceDocument) dataObject;
            if (maintDoc.getNewMaintainableObject() != null) {
                attributes.putAll(KRADUtils
                        .getNamespaceAndComponentSimpleName(maintDoc.getNewMaintainableObject().getDataObjectClass()));
                attributes.put(KRADConstants.MAINTENANCE_ACTN,
                        maintDoc.getNewMaintainableObject().getMaintenanceAction());
            }
        }
    }
FileProjectLine
org/kuali/rice/kns/datadictionary/exporter/DocumentEntryMapper.javaRice Implementation48
org/kuali/rice/kns/datadictionary/exporter/MaintenanceDocumentEntryMapper.javaRice Implementation53
        ExportMap entryMap = new ExportMap(entry.getJstlKey());

        Class businessRulesClass = entry.getBusinessRulesClass();
        if (businessRulesClass != null) {
            entryMap.set("businessRulesClass", businessRulesClass.getName());
        }

        entryMap.set("documentTypeName", entry.getDocumentTypeName());

        DocumentType docType = getDocumentType(entry.getDocumentTypeName());
        entryMap.set("label", docType.getLabel());

        if (docType.getDescription() != null) {
            entryMap.set("description", docType.getDescription());
        }

        DocumentHelperService documentHelperService = KRADServiceLocatorWeb.getDocumentHelperService();
        entryMap.set("documentAuthorizerClass", documentHelperService.getDocumentAuthorizer(entry.getDocumentTypeName()).getClass().getName());
        entryMap.set("documentPresentationControllerClass", documentHelperService.getDocumentPresentationController(entry.getDocumentTypeName()).getClass().getName());

        entryMap.set("allowsNoteAttachments", Boolean.toString(entry.getAllowsNoteAttachments()));

        entryMap.set("allowsNoteFYI", Boolean.toString(entry.getAllowsNoteFYI()));

        if (entry.getAttachmentTypesValuesFinderClass() != null) {
            entryMap.set("attachmentTypesValuesFinderClass", entry.getAttachmentTypesValuesFinderClass().getName());
        }

        entryMap.set("displayTopicFieldInNotes", Boolean.toString(entry.getDisplayTopicFieldInNotes()));

        entryMap.set("usePessimisticLocking", Boolean.toString(entry.getUsePessimisticLocking()));
        entryMap.set("useWorkflowPessimisticLocking", Boolean.toString(entry.getUseWorkflowPessimisticLocking()));
        entryMap.set("sessionDocument", Boolean.toString(entry.isSessionDocument()));

        entryMap.set(new AttributesMapBuilder().buildAttributesMap(entry));
        entryMap.set(new CollectionsMapBuilder().buildCollectionsMap(entry));
FileProjectLine
org/kuali/rice/krad/document/authorization/DocumentPresentationControllerBase.javaRice KRAD Web Framework220
org/kuali/rice/krad/uif/authorization/DocumentPresentationControllerBase.javaRice KRAD Web Framework42
        Document document = ((DocumentFormBase) model).getDocument();

        if (canEdit(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_EDIT);
        }

        if (canAnnotate(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_ANNOTATE);
        }

        if (canClose(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_CLOSE);
        }

        if (canSave(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_SAVE);
        }

        if (canRoute(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_ROUTE);
        }

        if (canCancel(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_CANCEL);
        }

        if (canReload(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_RELOAD);
        }

        if (canCopy(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_COPY);
        }

        if (canPerformRouteReport(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_PERFORM_ROUTE_REPORT);
        }

        if (canAddAdhocRequests(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_ADD_ADHOC_REQUESTS);
        }

        if (canBlanketApprove(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE);
        }

        if (canApprove(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_APPROVE);
        }

        if (canDisapprove(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_DISAPPROVE);
        }

        if (canSendAdhocRequests(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_SEND_ADHOC_REQUESTS);
        }

        if (canSendNoteFyi(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_SEND_NOTE_FYI);
        }

        if (this.canEditDocumentOverview(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_EDIT__DOCUMENT_OVERVIEW);
        }

        if (canFyi(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_FYI);
        }

        if (canAcknowledge(document)) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_ACKNOWLEDGE);
        }

        return documentActions;
    }
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl305
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl377
        AgendaBo agenda = getAgenda(form, request);
        // this is the root of the tree:
        AgendaItemBo firstItem = getFirstAgendaItem(agenda);
        AgendaItemBo node = getAgendaItemById(firstItem, getSelectedAgendaItemId(form));
        AgendaItemBo agendaItemLine = getAgendaItemLine(form);
        node.setRule(agendaItemLine.getRule());

        form.getActionParameters().put(UifParameters.NAVIGATE_TO_PAGE_ID, "AgendaEditorView-Agenda-Page");
        return super.navigate(form, result, request, response);
    }

    /**
     * @return the ALWAYS {@link AgendaItemInstanceChildAccessor} for the last ALWAYS child of the instance accessed by the parameter.
     * It will by definition refer to null.  If the instanceAccessor parameter refers to null, then it will be returned.  This is useful
     * for adding a youngest child to a sibling group. 
     */
    private AgendaItemInstanceChildAccessor getLastChildsAlwaysAccessor(AgendaItemInstanceChildAccessor instanceAccessor) {
        AgendaItemBo next = instanceAccessor.getChild();
        if (next == null) return instanceAccessor;
        while (next.getAlways() != null) { next = next.getAlways(); };
        return new AgendaItemInstanceChildAccessor(AgendaItemChildAccessor.always, next);
    }

    /**
     * @return the accessor to the child with the given agendaItemId under the given parent.  This method will search both When TRUE and 
     * When FALSE sibling groups.  If the instance with the given id is not found, null is returned.
     */
    private AgendaItemInstanceChildAccessor getInstanceAccessorToChild(AgendaItemBo parent, String agendaItemId) {

        // first try When TRUE, then When FALSE via AgendaItemChildAccessor.levelOrderChildren
        for (AgendaItemChildAccessor levelOrderChildAccessor : AgendaItemChildAccessor.children) {

            AgendaItemBo next = levelOrderChildAccessor.getChild(parent);
            
            // if the first item matches, return the accessor from the parent
            if (next != null && agendaItemId.equals(next.getId())) return new AgendaItemInstanceChildAccessor(levelOrderChildAccessor, parent);

            // otherwise walk the children
            while (next != null && next.getAlwaysId() != null) {
                if (next.getAlwaysId().equals(agendaItemId)) return new AgendaItemInstanceChildAccessor(AgendaItemChildAccessor.always, next);
                // move down
                next = next.getAlways();
            }
        }
        
        return null;
    }

    @RequestMapping(params = "methodToCall=" + "ajaxRefresh")
    public ModelAndView ajaxRefresh(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        // call the super method to avoid the agenda tree being reloaded from the db
        return super.updateComponent(form, result, request, response);
    }

    @RequestMapping(params = "methodToCall=" + "moveUp")
    public ModelAndView moveUp(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        moveSelectedSubtreeUp(form, request);
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation325
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation284
                        GlobalVariables.getMessageMap().putError(wsei.getMessage(), RiceKeyConstants.ERROR_CUSTOM, wsei.getArg1());
                    }
                    searchRows = attribute.getRuleRows();
                }
                for (Row row : searchRows) {
                    for (Field field : row.getFields()) {
                        if (fieldValues.get(field.getPropertyName()) != null) {
                            String attributeParam = fieldValues.get(field.getPropertyName());
                            if (!attributeParam.equals("")) {
                                if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) {
                                    attributes.put(field.getPropertyName(), attributeParam.trim());
                                } else {
                                    attributes.put(field.getPropertyName(), attributeParam.trim());
                                }
                            }
                        }
                        if (field.getFieldType().equals(Field.TEXT) || field.getFieldType().equals(Field.DROPDOWN) || field.getFieldType().equals(Field.DROPDOWN_REFRESH) || field.getFieldType().equals(Field.RADIO)) {
                            if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) {
                                myColumns.getColumns().add(new ConcreteKeyValue(field.getPropertyName(), ruleTemplateAttribute.getRuleTemplateAttributeId()+""));
                            } else {
                                myColumns.getColumns().add(new ConcreteKeyValue(field.getPropertyName(), ruleTemplateAttribute.getRuleTemplateAttributeId()+""));
                            }
                        }
                    }
                }
            }
        }

        if (!org.apache.commons.lang.StringUtils.isEmpty(ruleDescription)) {
            ruleDescription = ruleDescription.replace('*', '%');
            ruleDescription = "%" + ruleDescription.trim() + "%";
        }

        if (!errors.isEmpty()) {
FileProjectLine
org/kuali/rice/kew/api/document/lookup/DocumentLookupCriteria.javaRice KEW API202
org/kuali/rice/kew/api/document/lookup/DocumentLookupCriteria.javaRice KEW API388
            return new DocumentLookupCriteria(this);
        }

        @Override
        public String getDocumentId() {
            return this.documentId;
        }

        @Override
        public List<DocumentStatus> getDocumentStatuses() {
            return this.documentStatuses;
        }

        @Override
        public String getTitle() {
            return this.title;
        }

        @Override
        public String getApplicationDocumentId() {
            return this.applicationDocumentId;
        }

        @Override
        public String getInitiatorPrincipalName() {
            return this.initiatorPrincipalName;
        }

        @Override
        public String getViewerPrincipalName() {
            return this.viewerPrincipalName;
        }

        @Override
        public String getViewerGroupId() {
            return this.viewerGroupId;
        }

        @Override
        public String getApproverPrincipalName() {
            return this.approverPrincipalName;
        }

        @Override
        public String getRouteNodeName() {
            return this.routeNodeName;
        }

        @Override
        public RouteNodeLookupLogic getRouteNodeLookupLogic() {
            return this.routeNodeLookupLogic;
        }

        @Override
        public String getDocumentTypeName() {
            return this.documentTypeName;
        }

        @Override
        public DateTime getDateCreatedFrom() {
            return this.dateCreatedFrom;
        }

        @Override
        public DateTime getDateCreatedTo() {
            return this.dateCreatedTo;
        }

        @Override
        public DateTime getDateLastModifiedFrom() {
            return this.dateLastModifiedFrom;
        }

        @Override
        public DateTime getDateLastModifiedTo() {
            return this.dateLastModifiedTo;
        }

        @Override
        public DateTime getDateApprovedFrom() {
            return this.dateApprovedFrom;
        }

        @Override
        public DateTime getDateApprovedTo() {
            return this.dateApprovedTo;
        }

        @Override
        public DateTime getDateFinalizedFrom() {
            return this.dateFinalizedFrom;
        }

        @Override
        public DateTime getDateFinalizedTo() {
            return this.dateFinalizedTo;
        }

        @Override
        public Map<String, String> getDocumentAttributeValues() {
            return this.documentAttributeValues;
        }

        @Override
        public Integer getStartAtIndex() {
            return this.startAtIndex;
        }

        @Override
        public Integer getMaxResults() {
            return this.maxResults;
        }

        public void setDocumentId(String documentId) {
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceStructureServiceJpaImpl.javaRice Implementation435
org/kuali/rice/krad/service/impl/PersistenceStructureServiceOjbImpl.javaRice Implementation460
			}
		}
		
		return fkMap;
	}

	/**
	 * @see org.kuali.rice.krad.service.PersistenceMetadataService#hasPrimaryKeyFieldValues(java.lang.Object)
	 */
	public boolean hasPrimaryKeyFieldValues(Object persistableObject) {
		Map keyFields = getPrimaryKeyFieldValues(persistableObject);

		boolean emptyField = false;
		for (Iterator i = keyFields.entrySet().iterator(); !emptyField && i.hasNext();) {
			Map.Entry e = (Map.Entry) i.next();

			Object fieldValue = e.getValue();
			if (fieldValue == null) {
				emptyField = true;
			} else if (fieldValue instanceof String) {
				if (StringUtils.isEmpty((String) fieldValue)) {
					emptyField = true;
				} else {
					emptyField = false;
				}
			}
		}

		return !emptyField;
	}

	/**
	 * @see org.kuali.rice.krad.service.PersistenceService#getForeignKeyFieldsPopulationState(org.kuali.rice.krad.bo.BusinessObject,
	 *      java.lang.String)
	 */
	public ForeignKeyFieldsPopulationState getForeignKeyFieldsPopulationState(PersistableBusinessObject bo, String referenceName) {
		boolean allFieldsPopulated = true;
		boolean anyFieldsPopulated = false;
		List<String> unpopulatedFields = new ArrayList<String>();

		// yelp if nulls were passed in
		if (bo == null) {
			throw new IllegalArgumentException("The Class passed in for the BusinessObject argument was null.");
		}
		if (StringUtils.isBlank(referenceName)) {
			throw new IllegalArgumentException("The String passed in for the referenceName argument was null or empty.");
		}

		PropertyDescriptor propertyDescriptor = null;

		// make sure the attribute exists at all, throw exception if not
		try {
			propertyDescriptor = PropertyUtils.getPropertyDescriptor(bo, referenceName);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
		if (propertyDescriptor == null) {
			throw new ReferenceAttributeDoesntExistException("Requested attribute: '" + referenceName + "' does not exist " + "on class: '" + bo.getClass().getName() + "'.");
		}

		// get the class of the attribute name
		Class referenceClass = propertyDescriptor.getPropertyType();

		// make sure the class of the attribute descends from BusinessObject,
		// otherwise throw an exception
		if (!PersistableBusinessObject.class.isAssignableFrom(referenceClass)) {
			throw new ObjectNotABusinessObjectRuntimeException("Attribute requested (" + referenceName + ") is of class: " + "'" + referenceClass.getName() + "' and is not a " + "descendent of BusinessObject.  Only descendents of BusinessObject " + "can be used.");
		}
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation447
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation411
            Person person = KimApiServiceLocator.getPersonService().getPersonByPrincipalName(personId);/** IU fix EN-1552 */
            if (person == null) {
                GlobalVariables.getMessageMap().putError(PERSON_REVIEWER_PROPERTY_NAME, RiceKeyConstants.ERROR_CUSTOM, INVALID_PERSON_ERROR);
            }
        }
        if (!GlobalVariables.getMessageMap().hasNoErrors()) {
            throw new ValidationException("errors in search criteria");
        }
    }

    @Override
    public Collection performLookup(LookupForm lookupForm,
            Collection resultTable, boolean bounded) {
        // TODO jjhanso - THIS METHOD NEEDS JAVADOCS
        //return super.performLookup(lookupForm, resultTable, bounded);
        setBackLocation((String) lookupForm.getFieldsForLookup().get(KRADConstants.BACK_LOCATION));
        setDocFormKey((String) lookupForm.getFieldsForLookup().get(KRADConstants.DOC_FORM_KEY));
        Collection displayList;

        // call search method to get results
        if (bounded) {
            displayList = getSearchResults(lookupForm.getFieldsForLookup());
        }
        else {
            displayList = getSearchResultsUnbounded(lookupForm.getFieldsForLookup());
        }

        HashMap<String,Class> propertyTypes = new HashMap<String, Class>();

        boolean hasReturnableRow = false;

        List returnKeys = getReturnKeys();
        List pkNames = getBusinessObjectMetaDataService().listPrimaryKeyFieldNames(getBusinessObjectClass());
        Person user = GlobalVariables.getUserSession().getPerson();

        // iterate through result list and wrap rows with return url and action urls
        for (Iterator iter = displayList.iterator(); iter.hasNext();) {
            BusinessObject element = (BusinessObject) iter.next();
            if(element instanceof PersistableBusinessObject){
                lookupForm.setLookupObjectId(((PersistableBusinessObject)element).getObjectId());
            }

            BusinessObjectRestrictions businessObjectRestrictions = getBusinessObjectAuthorizationService().getLookupResultRestrictions(element, user);

            HtmlData returnUrl = getReturnUrl(element, lookupForm, returnKeys, businessObjectRestrictions);

            String actionUrls = getActionUrls(element, pkNames, businessObjectRestrictions);
            //Fix for JIRA - KFSMI-2417
            if("".equals(actionUrls)){
                actionUrls = ACTION_URLS_EMPTY;
            }
FileProjectLine
org/kuali/rice/krad/document/authorization/DocumentPresentationControllerBase.javaRice KRAD Web Framework35
org/kuali/rice/krad/uif/authorization/DocumentPresentationControllerBase.javaRice KRAD Web Framework119
    public boolean canInitiate(String documentTypeName) {
        return true;
    }

    /**
     * @param document
     * @return boolean (true if can edit the document)
     */
    protected boolean canEdit(Document document) {
        boolean canEdit = false;
        WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
        if (workflowDocument.isInitiated() || workflowDocument.isSaved() || workflowDocument.isEnroute()
                || workflowDocument.isException()) {
            canEdit = true;
        }

        return canEdit;
    }

    /**
     * @param document
     * @return boolean (true if can add notes to the document)
     */
    protected boolean canAnnotate(Document document) {
        return canEdit(document);
    }

    /**
     * @param document
     * @return boolean (true if can reload the document)
     */
    protected boolean canReload(Document document) {
        WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
        return (canEdit(document) && !workflowDocument.isInitiated());

    }

    /**
     * @param document
     * @return boolean (true if can close the document)
     */
    protected boolean canClose(Document document) {
        return true;
    }

    /**
     * @param document
     * @return boolean (true if can save the document)
     */
    protected boolean canSave(Document document) {
        return canEdit(document);
    }

    /**
     * @param document
     * @return boolean (true if can route the document)
     */
    protected boolean canRoute(Document document) {
        boolean canRoute = false;
        WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
        if (workflowDocument.isInitiated() || workflowDocument.isSaved()) {
            canRoute = true;
        }
        return canRoute;
    }

    /**
     * @param document
     * @return boolean (true if can cancel the document)
     */
    protected boolean canCancel(Document document) {
        return canEdit(document);
    }

    /**
     * @param document
     * @return boolean (true if can copy the document)
     */
    protected boolean canCopy(Document document) {
        boolean canCopy = false;
        if (document.getAllowsCopy()) {
            canCopy = true;
        }
        return canCopy;
    }

    /**
     * @param document
     * @return boolean (true if can perform route report)
     */
    protected boolean canPerformRouteReport(Document document) {
        return getParameterService().getParameterValueAsBoolean(KRADConstants.KRAD_NAMESPACE,
                KRADConstants.DetailTypes.DOCUMENT_DETAIL_TYPE,
                KRADConstants.SystemGroupParameterNames.DEFAULT_CAN_PERFORM_ROUTE_REPORT_IND);
    }

    /**
     * @param document
     * @return boolean (true if can do ad hoc route)
     */
    protected boolean canAddAdhocRequests(Document document) {
        return true;
    }

    /**
     * This method ...
     * 
     * @param document
     * @return boolean (true if can blanket approve the document)
     */
    protected boolean canBlanketApprove(Document document) {
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl509
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl570
        String selectedItemId = request.getParameter(AGENDA_ITEM_SELECTED);
        AgendaItemBo node = getAgendaItemById(firstItem, selectedItemId);
        AgendaItemBo parent = getParent(firstItem, selectedItemId);
        AgendaItemBo parentsYoungerCousin = (parent == null) ? null : getNextYoungestOfSameGeneration(firstItem, parent);

        if (node.getAlways() == null && parent != null) { // node is last child in sibling group
            // set link to selected node to null
            if (parent.getWhenTrue() != null && isSiblings(parent.getWhenTrue(), node)) { // node is in When TRUE group
                // move node to first child under When FALSE

                AgendaItemInstanceChildAccessor accessorToSelectedNode = getInstanceAccessorToChild(parent, node.getId());
                accessorToSelectedNode.setChild(null);

                AgendaItemBo parentsFirstChild = parent.getWhenFalse();
                AgendaItemChildAccessor.whenFalse.setChild(parent, node);
                AgendaItemChildAccessor.always.setChild(node, parentsFirstChild);
            } else if (parentsYoungerCousin != null) { // node is in the When FALSE group
                // move to first child of parentsYoungerCousin under When TRUE

                AgendaItemInstanceChildAccessor accessorToSelectedNode = getInstanceAccessorToChild(parent, node.getId());
                accessorToSelectedNode.setChild(null);

                AgendaItemBo parentsYoungerCousinsFirstChild = parentsYoungerCousin.getWhenTrue();
                AgendaItemChildAccessor.whenTrue.setChild(parentsYoungerCousin, node);
                AgendaItemChildAccessor.always.setChild(node, parentsYoungerCousinsFirstChild);
            }
        } else if (node.getAlways() != null) { // move node down within its sibling group

            AgendaItemBo bogusRootNode = null;
            if (parent == null) {
                // special case, this is a top level sibling. rig up special parent node
                bogusRootNode = new AgendaItemBo();
                AgendaItemChildAccessor.whenFalse.setChild(bogusRootNode, firstItem);
                parent = bogusRootNode;
            }

            // move node down within its sibling group
            AgendaItemInstanceChildAccessor accessorToSelectedNode = getInstanceAccessorToChild(parent, node.getId());
            AgendaItemBo youngerSibling = node.getAlways();
            accessorToSelectedNode.setChild(youngerSibling);
            AgendaItemChildAccessor.always.setChild(node, youngerSibling.getAlways());
            AgendaItemChildAccessor.always.setChild(youngerSibling, node);

            if (bogusRootNode != null) {
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl411
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl477
        String selectedItemId = request.getParameter(AGENDA_ITEM_SELECTED);
        AgendaItemBo node = getAgendaItemById(firstItem, selectedItemId);
        AgendaItemBo parent = getParent(firstItem, selectedItemId);
        AgendaItemBo parentsOlderCousin = (parent == null) ? null : getNextOldestOfSameGeneration(firstItem, parent);

        AgendaItemChildAccessor childAccessor = getOldestChildAccessor(node, parent);
        if (childAccessor != null) { // node is first child in sibling group
            if (childAccessor == AgendaItemChildAccessor.whenFalse) {
                // move node to last position in When TRUE group
                AgendaItemInstanceChildAccessor youngestWhenTrueSiblingInsertionPoint =
                        getLastChildsAlwaysAccessor(new AgendaItemInstanceChildAccessor(AgendaItemChildAccessor.whenTrue, parent));
                youngestWhenTrueSiblingInsertionPoint.setChild(node);
                AgendaItemChildAccessor.whenFalse.setChild(parent, node.getAlways());
                AgendaItemChildAccessor.always.setChild(node, null);

            } else if (parentsOlderCousin != null) {
                // find youngest child of parentsOlderCousin and put node after it
                AgendaItemInstanceChildAccessor youngestWhenFalseSiblingInsertionPoint =
                        getLastChildsAlwaysAccessor(new AgendaItemInstanceChildAccessor(AgendaItemChildAccessor.whenFalse, parentsOlderCousin));
                youngestWhenFalseSiblingInsertionPoint.setChild(node);
                AgendaItemChildAccessor.whenTrue.setChild(parent, node.getAlways());
                AgendaItemChildAccessor.always.setChild(node, null);
            }
        } else if (!selectedItemId.equals(firstItem.getId())) { // conditional to miss special case of first node

            AgendaItemBo bogusRootNode = null;
            if (parent == null) {
                // special case, this is a top level sibling. rig up special parent node
                bogusRootNode = new AgendaItemBo();
                AgendaItemChildAccessor.whenTrue.setChild(bogusRootNode, firstItem);
                parent = bogusRootNode;
            }

            // move node up within its sibling group
            AgendaItemInstanceChildAccessor accessorToSelectedNode = getInstanceAccessorToChild(parent, node.getId());
            AgendaItemBo olderSibling = accessorToSelectedNode.getInstance();
            AgendaItemInstanceChildAccessor accessorToOlderSibling = getInstanceAccessorToChild(parent, olderSibling.getId());

            accessorToOlderSibling.setChild(node);
            accessorToSelectedNode.setChild(node.getAlways());
            AgendaItemChildAccessor.always.setChild(node, olderSibling);

            if (bogusRootNode != null) {
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation127
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation77
        Criteria criteria = new Criteria();
        Iterator propsIter = formProps.keySet().iterator();
        while (propsIter.hasNext()) {
            String propertyName = (String) propsIter.next();
            Boolean caseInsensitive = Boolean.TRUE;
        	if ( KRADServiceLocatorWeb.getDataDictionaryService().isAttributeDefined( example.getClass(), propertyName )) {
        		// If forceUppercase is true, both the database value and the user entry should be converted to Uppercase -- so change the caseInsensitive to false since we don't need to 
        		// worry about the values not matching.  However, if forceUppercase is false, make sure to do a caseInsensitive search because the database value and user entry 
        		// could be mixed case.  Thus, caseInsensitive will be the opposite of forceUppercase. 
        		caseInsensitive = !KRADServiceLocatorWeb.getDataDictionaryService().getAttributeForceUppercase( example.getClass(), propertyName );
        	}
        	if ( caseInsensitive == null ) { caseInsensitive = Boolean.TRUE; }
        	boolean treatWildcardsAndOperatorsAsLiteral = KRADServiceLocatorWeb
        			.getBusinessObjectDictionaryService().isLookupFieldTreatWildcardsAndOperatorsAsLiteral(example.getClass(), propertyName);
        	
            if (formProps.get(propertyName) instanceof Collection) {
                Iterator iter = ((Collection) formProps.get(propertyName)).iterator();
                while (iter.hasNext()) {
                    String searchValue = (String) iter.next();
            		if (!caseInsensitive) { 
            			// Verify that the searchValue is uppercased if caseInsensitive is false 
            			searchValue = searchValue.toUpperCase(); 
            		}
                    if (!createCriteria(example, searchValue, propertyName, caseInsensitive, treatWildcardsAndOperatorsAsLiteral, criteria, formProps )) {
                        throw new RuntimeException("Invalid value in Collection");
                    }
                }
            }
            else {
                String searchValue = (String) formProps.get(propertyName);
        		if (!caseInsensitive) { 
        			// Verify that the searchValue is uppercased if caseInsensitive is false 
        			searchValue = searchValue.toUpperCase(); 
        		}
                if (!createCriteria(example, searchValue, propertyName, caseInsensitive, treatWildcardsAndOperatorsAsLiteral, criteria, formProps)) {
                    continue;
                }
            }
        }
        return criteria;
    }
    
    public Criteria getCollectionCriteriaFromMapUsingPrimaryKeysOnly(Class businessObjectClass, Map formProps) {
FileProjectLine
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.javaRice Implementation227
org/kuali/rice/ken/web/spring/SendNotificationMessageController.javaRice Implementation228
    public ModelAndView submitSimpleNotificationMessage(
            HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        LOG.debug("remoteUser: " + request.getRemoteUser());

        // obtain a workflow user object first
        //WorkflowIdDTO initiator = new WorkflowIdDTO(request.getRemoteUser());
        String initiatorId = request.getRemoteUser();

        // now construct the workflow document, which will interact with workflow
        WorkflowDocument document;
        Map<String, Object> model = new HashMap<String, Object>();
        String view;
        try {
            document = NotificationWorkflowDocument.createNotificationDocument(
                    initiatorId,
                    NotificationConstants.KEW_CONSTANTS.SEND_NOTIFICATION_REQ_DOC_TYPE);

            //parse out the application content into a Notification BO
            Notification notification = populateNotificationInstance(request,
                    model);

            // now get that content in an understandable XML format and pass into document
            String notificationAsXml = messageContentService
                    .generateNotificationMessage(notification);

            Map<String, String> attrFields = new HashMap<String, String>();
            List<NotificationChannelReviewer> reviewers = notification.getChannel().getReviewers();
            int ui = 0;
            int gi = 0;
            for (NotificationChannelReviewer reviewer : reviewers) {
                String prefix;
                int index;
                if (KimGroupMemberTypes.PRINCIPAL_MEMBER_TYPE.equals(reviewer.getReviewerType())) {
                    prefix = "user";
                    index = ui;
                    ui++;
                } else if (KimGroupMemberTypes.GROUP_MEMBER_TYPE.equals(reviewer.getReviewerType())) {
                    prefix = "group";
                    index = gi;
                    gi++;
                } else {
                    LOG.error("Invalid type for reviewer " + reviewer.getReviewerId() + ": "
                            + reviewer.getReviewerType());
                    continue;
                }
                attrFields.put(prefix + index, reviewer.getReviewerId());
            }
            GenericAttributeContent gac = new GenericAttributeContent("channelReviewers");
            document.setApplicationContent(notificationAsXml);
            document.setAttributeContent("<attributeContent>" + gac.generateContent(attrFields) + "</attributeContent>");

            document.setTitle(notification.getTitle());

            document.route("This message was submitted via the simple notification message submission form by user "
FileProjectLine
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl117
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl330
    public ModelAndView addRule(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        MaintenanceForm maintenanceForm = (MaintenanceForm) form;
        AgendaEditor editorDocument =
                ((AgendaEditor) maintenanceForm.getDocument().getNewMaintainableObject().getDataObject());
        AgendaBo agenda = editorDocument.getAgenda();
        AgendaItemBo newAgendaItem = editorDocument.getAgendaItemLine();
        newAgendaItem.setId(getSequenceAccessorService().getNextAvailableSequenceNumber("KRMS_AGENDA_ITM_S").toString());
        newAgendaItem.setAgendaId(agenda.getId());
        if (agenda.getItems() == null) {
            agenda.setItems(new ArrayList<AgendaItemBo>());
        }
        if (agenda.getFirstItemId() == null) {
            agenda.setFirstItemId(newAgendaItem.getId());
            agenda.getItems().add(newAgendaItem);
        } else {
            // insert agenda in tree
            String selectedAgendaItemId = getSelectedAgendaItemId(form);
            if (StringUtils.isBlank(selectedAgendaItemId)) {
                // add after the last root node
                AgendaItemBo node = getFirstAgendaItem(agenda);
                while (node.getAlways() != null) {
                    node = node.getAlways();
                }
                node.setAlwaysId(newAgendaItem.getId());
                node.setAlways(newAgendaItem);
            } else {
                // add after selected node
                AgendaItemBo firstItem = getFirstAgendaItem(agenda);
                AgendaItemBo node = getAgendaItemById(firstItem, getSelectedAgendaItemId(form));
                newAgendaItem.setAlwaysId(node.getAlwaysId());
                newAgendaItem.setAlways(node.getAlways());
                node.setAlwaysId(newAgendaItem.getId());
                node.setAlways(newAgendaItem);
            }
        }
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl1164
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl1017
    private static class AgendaItemChildAccessor {
        
        private enum Child { WHEN_TRUE, WHEN_FALSE, ALWAYS };
        
        private static final AgendaItemChildAccessor whenTrue = new AgendaItemChildAccessor(Child.WHEN_TRUE); 
        private static final AgendaItemChildAccessor whenFalse = new AgendaItemChildAccessor(Child.WHEN_FALSE); 
        private static final AgendaItemChildAccessor always = new AgendaItemChildAccessor(Child.ALWAYS); 

        /**
         * Accessors for all linked items
         */
        private static final AgendaItemChildAccessor [] linkedNodes = { whenTrue, whenFalse, always };
        
        /**
         * Accessors for children (so ALWAYS is omitted);
         */
        private static final AgendaItemChildAccessor [] children = { whenTrue, whenFalse };
        
        private final Child whichChild;
        
        private AgendaItemChildAccessor(Child whichChild) {
            if (whichChild == null) throw new IllegalArgumentException("whichChild must be non-null");
            this.whichChild = whichChild;
        }
        
        /**
         * @return the referenced child
         */
        public AgendaItemBo getChild(AgendaItemBo parent) {
            switch (whichChild) {
            case WHEN_TRUE: return parent.getWhenTrue();
            case WHEN_FALSE: return parent.getWhenFalse();
            case ALWAYS: return parent.getAlways();
            default: throw new IllegalStateException();
            }
        }
        
        /**
         * Sets the child reference and the child id 
         */
        public void setChild(AgendaItemBo parent, AgendaItemBo child) {
            switch (whichChild) {
            case WHEN_TRUE: 
                parent.setWhenTrue(child);
                parent.setWhenTrueId(child == null ? null : child.getId());
                break;
            case WHEN_FALSE:
                parent.setWhenFalse(child);
                parent.setWhenFalseId(child == null ? null : child.getId());
                break;
            case ALWAYS:
                parent.setAlways(child);
                parent.setAlwaysId(child == null ? null : child.getId());
                break;
            default: throw new IllegalStateException();
            }
        }
    }
FileProjectLine
org/kuali/rice/krad/document/authorization/DocumentAuthorizerBase.javaRice KRAD Web Framework262
org/kuali/rice/krad/uif/authorization/DocumentAuthorizerBase.javaRice KRAD Web Framework245
				user.getPrincipalId(), additionalPermissionDetails, null);
	}

	@Override
	protected void addPermissionDetails(Object dataObject,
			Map<String, String> attributes) {
		super.addPermissionDetails(dataObject, attributes);
		if (dataObject instanceof Document) {
			addStandardAttributes((Document) dataObject, attributes);
		}
	}

	@Override
	protected void addRoleQualification(Object dataObject,
			Map<String, String> attributes) {
		super.addRoleQualification(dataObject, attributes);
		if (dataObject instanceof Document) {
			addStandardAttributes((Document) dataObject, attributes);
		}
	}

	protected void addStandardAttributes(Document document,
			Map<String, String> attributes) {
		WorkflowDocument wd = document.getDocumentHeader()
				.getWorkflowDocument();
		attributes.put(KimConstants.AttributeConstants.DOCUMENT_NUMBER, document
				.getDocumentNumber());
		attributes.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, wd.getDocumentTypeName());
		if (wd.isInitiated() || wd.isSaved()) {
			attributes.put(KimConstants.AttributeConstants.ROUTE_NODE_NAME,
					PRE_ROUTING_ROUTE_NAME);
		} else {
			attributes.put(KimConstants.AttributeConstants.ROUTE_NODE_NAME, KRADServiceLocatorWeb.getWorkflowDocumentService().getCurrentRouteNodeNames(wd));
		}
		attributes.put(KimConstants.AttributeConstants.ROUTE_STATUS_CODE, wd.getStatus().getCode());
	}
	
	protected boolean isDocumentInitiator(Document document, Person user) {
        WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
        return workflowDocument.getInitiatorPrincipalId().equalsIgnoreCase(user.getPrincipalId());
    }

}
FileProjectLine
org/kuali/rice/ksb/security/soap/CXFWSS4JInInterceptor.javaRice Implementation48
org/kuali/rice/ksb/security/soap/CXFWSS4JOutInterceptor.javaRice Implementation45
	public CXFWSS4JOutInterceptor(boolean busSecurity) {
		this.busSecurity = busSecurity;
		this.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
		this.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, CryptoPasswordCallbackHandler.class.getName());
		this.setProperty(WSHandlerConstants.SIG_KEY_ID, "IssuerSerial");
		this.setProperty(WSHandlerConstants.USER, ConfigContext.getCurrentContextConfig().getKeystoreAlias());
	}

	@Override
	public Crypto loadSignatureCrypto(RequestData reqData) {
		try {
			return new Merlin(getMerlinProperties(), ClassLoaderUtils.getDefaultClassLoader());
		} catch (Exception e) {
			throw new RiceRuntimeException(e);
		}
	}

	@Override
	public Crypto loadDecryptionCrypto(RequestData reqData) {
		return loadSignatureCrypto(reqData);
	}

	protected Properties getMerlinProperties() {
		Properties props = new Properties();
		props.put("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
		props.put("org.apache.ws.security.crypto.merlin.keystore.password", ConfigContext.getCurrentContextConfig().getKeystorePassword());
		props.put("org.apache.ws.security.crypto.merlin.alias.password", ConfigContext.getCurrentContextConfig().getKeystorePassword());
		props.put("org.apache.ws.security.crypto.merlin.keystore.alias", ConfigContext.getCurrentContextConfig().getKeystoreAlias());
		props.put("org.apache.ws.security.crypto.merlin.file", ConfigContext.getCurrentContextConfig().getKeystoreFile());

		if (LOG.isDebugEnabled()) {
			LOG.debug("Using keystore location " + ConfigContext.getCurrentContextConfig().getKeystoreFile());
		}

		return props;
	}

	/**
	 * This overridden method will not apply security headers if bus security is disabled.
	 * 
	 * @see org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor#handleMessage(org.apache.cxf.binding.soap.SoapMessage)
	 */
	@Override
	public void handleMessage(SoapMessage mc) {
		if (busSecurity) {
			super.handleMessage(mc);
		}
	}

}
FileProjectLine
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.javaRice Implementation63
org/kuali/rice/ken/web/spring/SendNotificationMessageController.javaRice Implementation62
            .getLogger(SendNotificationMessageController.class);

    private static final String NONE_CHANNEL = "___NONE___";
    private static final long REASONABLE_IMMEDIATE_TIME_THRESHOLD = 1000 * 60 * 5; // <= 5 minutes is "immediate"

    /**
     * Returns whether the specified time is considered "in the future", based on some reasonable
     * threshold
     * @param time the time to test
     * @return whether the specified time is considered "in the future", based on some reasonable
     *         threshold
     */
    private boolean timeIsInTheFuture(long time) {
        boolean future = (time - System.currentTimeMillis()) > REASONABLE_IMMEDIATE_TIME_THRESHOLD;
        LOG.info("Time: " + new Date(time) + " is in the future? " + future);
        return future;
    }

    /**
     * Returns whether the specified Notification can be reasonably expected to have recipients.
     * This is determined on whether the channel has default recipients, is subscribably, and
     * whether the send date time is far enough in the future to expect that if there are no
     * subscribers, there may actually be some by the time the notification is sent.
     * @param notification the notification to test
     * @return whether the specified Notification can be reasonably expected to have recipients
     */
    private boolean hasPotentialRecipients(Notification notification) {
        LOG.info("notification channel " + notification.getChannel() + " is subscribable: "
                + notification.getChannel().isSubscribable());
        return notification.getChannel().getRecipientLists().size() > 0
                ||
                notification.getChannel().getSubscriptions().size() > 0
                ||
                (notification.getChannel().isSubscribable() && timeIsInTheFuture(notification.getSendDateTime()
                        .getTime()));
    }

    protected NotificationService notificationService;

    protected NotificationWorkflowDocumentService notificationWorkflowDocService;

    protected NotificationChannelService notificationChannelService;

    protected NotificationRecipientService notificationRecipientService;

    protected NotificationMessageContentService messageContentService;

    protected GenericDao businessObjectDao;

    /**
     * Set the NotificationService
     * @param notificationService
     */
    public void setNotificationService(NotificationService notificationService) {
        this.notificationService = notificationService;
    }

    /**
     * This method sets the NotificationWorkflowDocumentService
     * @param s
     */
    public void setNotificationWorkflowDocumentService(
            NotificationWorkflowDocumentService s) {
        this.notificationWorkflowDocService = s;
    }

    /**
     * Sets the notificationChannelService attribute value.
     * @param notificationChannelService The notificationChannelService to set.
     */
    public void setNotificationChannelService(
            NotificationChannelService notificationChannelService) {
        this.notificationChannelService = notificationChannelService;
    }

    /**
     * Sets the notificationRecipientService attribute value.
     * @param notificationRecipientService
     */
    public void setNotificationRecipientService(
            NotificationRecipientService notificationRecipientService) {
        this.notificationRecipientService = notificationRecipientService;
    }

    /**
     * Sets the messageContentService attribute value.
     * @param messageContentService
     */
    public void setMessageContentService(
            NotificationMessageContentService notificationMessageContentService) {
        this.messageContentService = notificationMessageContentService;
    }

    /**
     * Sets the businessObjectDao attribute value.
     * @param businessObjectDao The businessObjectDao to set.
     */
    public void setBusinessObjectDao(GenericDao businessObjectDao) {
        this.businessObjectDao = businessObjectDao;
    }

    /**
     * Handles the display of the form for sending a simple notification message
     * @param request : a servlet request
     * @param response : a servlet response
     * @throws ServletException : an exception
     * @throws IOException : an exception
     * @return a ModelAndView object
     */
    public ModelAndView sendSimpleNotificationMessage(
FileProjectLine
org/kuali/rice/kew/api/action/ActionItem.javaRice KEW API135
org/kuali/rice/kew/api/action/ActionItem.javaRice KEW API305
            return new ActionItem(this);
        }

        @Override
        public String getId() {
            return this.id;
        }

        @Override
        public DateTime getDateTimeAssigned() {
            return this.dateTimeAssigned;
        }

        @Override
        public String getActionRequestCd() {
            return this.actionRequestCd;
        }

        @Override
        public String getActionRequestId() {
            return this.actionRequestId;
        }

        @Override
        public String getDocumentId() {
            return this.documentId;
        }

        @Override
        public String getDocTitle() {
            return this.docTitle;
        }

        @Override
        public String getDocLabel() {
            return this.docLabel;
        }

        @Override
        public String getDocHandlerURL() {
            return this.docHandlerURL;
        }

        @Override
        public String getDocName() {
            return this.docName;
        }

        @Override
        public String getResponsibilityId() {
            return this.responsibilityId;
        }

        @Override
        public String getRoleName() {
            return this.roleName;
        }

        @Override
        public String getDateAssignedString() {
            return this.dateAssignedString;
        }

        @Override
        public String getActionToTake() {
            return this.actionToTake;
        }

        @Override
        public String getDelegationType() {
            return this.delegationType;
        }

        @Override
        public Integer getActionItemIndex() {
            return this.actionItemIndex;
        }

        @Override
        public String getGroupId() {
            return this.groupId;
        }

        @Override
        public String getPrincipalId() {
            return this.principalId;
        }

        @Override
        public String getDelegatorGroupId() {
            return this.delegatorGroupId;
        }

        @Override
        public String getDelegatorPrincipalId() {
            return this.delegatorPrincipalId;
        }

        public void setId(String id) {
FileProjectLine
org/kuali/rice/kew/docsearch/dao/impl/DocumentSearchDAOJdbcImpl.javaRice Implementation136
org/kuali/rice/kew/docsearch/dao/impl/DocumentSearchDAOOjbImpl.javaRice Implementation145
    }

    private int getSearchResultCap(DocumentSearchGenerator docSearchGenerator) {
        int resultCap = docSearchGenerator.getDocumentSearchResultSetLimit();
        String resultCapValue = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString(KEWConstants.KEW_NAMESPACE, KRADConstants.DetailTypes.DOCUMENT_SEARCH_DETAIL_TYPE, KEWConstants.DOC_SEARCH_RESULT_CAP);
        if (!StringUtils.isBlank(resultCapValue)) {
            try {
                Integer maxResultCap = Integer.parseInt(resultCapValue);
                if (resultCap > maxResultCap) {
                    LOG.warn("Document Search Generator (" + docSearchGenerator.getClass().getName() + ") gives result set cap of " + resultCap + " which is greater than parameter " + KEWConstants.DOC_SEARCH_RESULT_CAP + " value of " + maxResultCap);
                    resultCap = maxResultCap;
                } else if (maxResultCap <= 0) {
                    LOG.warn(KEWConstants.DOC_SEARCH_RESULT_CAP + " was less than or equal to zero.  Please use a positive integer.");
                }
            } catch (NumberFormatException e) {
                LOG.warn(KEWConstants.DOC_SEARCH_RESULT_CAP + " is not a valid number.  Value was " + resultCapValue);
            }
        }
        return resultCap;
    }

    // TODO delyea: use searchable attribute count here?
    private int getFetchMoreIterationLimit() {
        int fetchMoreLimit = DEFAULT_FETCH_MORE_ITERATION_LIMIT;
        String fetchMoreLimitValue = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString(KEWConstants.KEW_NAMESPACE, KRADConstants.DetailTypes.DOCUMENT_SEARCH_DETAIL_TYPE, KEWConstants.DOC_SEARCH_FETCH_MORE_ITERATION_LIMIT);
        if (!StringUtils.isBlank(fetchMoreLimitValue)) {
            try {
                fetchMoreLimit = Integer.parseInt(fetchMoreLimitValue);
                if (fetchMoreLimit < 0) {
                    LOG.warn(KEWConstants.DOC_SEARCH_FETCH_MORE_ITERATION_LIMIT + " was less than zero.  Please use a value greater than or equal to zero.");
                    fetchMoreLimit = DEFAULT_FETCH_MORE_ITERATION_LIMIT;
                }
            } catch (NumberFormatException e) {
                LOG.warn(KEWConstants.DOC_SEARCH_FETCH_MORE_ITERATION_LIMIT + " is not a valid number.  Value was " + fetchMoreLimitValue);
            }
        }
        return fetchMoreLimit;
    }

    //
    //    protected DatabasePlatform getPlatform() {
    //    	return (DatabasePlatform)GlobalResourceLoader.getService(KEWServiceLocator.DB_PLATFORM);
    //    }
}
FileProjectLine
org/kuali/rice/core/impl/impex/xml/ClassLoaderEntityResolver.javaRice Core Impl36
org/kuali/rice/kew/xml/ClassLoaderEntityResolver.javaRice Implementation36
public class ClassLoaderEntityResolver implements EntityResolver {
    private static final Logger LOG = Logger.getLogger(ClassLoaderEntityResolver.class);

    /**
     * This contains definitions for items in the core "xml" schema, i.e. base, id, lang, and space attributes. 
     */
    private static final String XML_NAMESPACE_SCHEMA = "http://www.w3.org/2001/xml.xsd";
    private static final String XSD_NAMESPACE_SCHEMA = "http://www.w3.org/2001/XMLSchema.xsd";
    
    private final String base;
    public ClassLoaderEntityResolver() {
        this.base = "schema";
    }
    public ClassLoaderEntityResolver(String base) {
        this.base = base;
    }
    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
        LOG.debug("Resolving '" + publicId + "' / '" + systemId + "'");
        String path = "";
        if (systemId.equals(XML_NAMESPACE_SCHEMA)) {
            path = base + "/xml.xsd";
        } else if (systemId.equals(XSD_NAMESPACE_SCHEMA)) {
            path = base + "/XMLSchema.xsd";
        } else if (systemId.startsWith("resource")) {
            /* It turns out that the stock XMLSchema.xsd refers to XMLSchema.dtd in a relative
               fashion which results in the parser qualifying it to some local file:// path
               which breaks our detection here.
               So I have made a small mod to the stock XMLSchema.xsd so that it instead refers to
               resource:XMLSchema.dtd which can be looked up locally.
               The same is true for XMLSchema.dtd with regard to datatypes.dtd, so I have also
               modified XMLSchema.dtd to refer to resource:datatypes.dtd.
               An alternative would be to rely on publicId, however that would essentially hard code
               the lookup to always be in the classpath and rule out being able to redirect the location
               of the physical resource through the systemId, which is useful.
            */

            // TODO: revisit making this more sophisticated than just the classloader
            // of this class (thread context classloader? plugin classloader?)
            path = base + "/" + systemId.substring("resource:".length());
            // ok, if the path does not itself end in .xsd or .dtd, it is bare/abstract
            // so realize it by appending .xsd
            // this allows us to support looking up files ending with ".dtd" through resource: without
            // having extra logic to attempt to look up both suffixes for every single resource:
            // (all of which except XMLSchema.dtd and datatypes.dtd at this point are .xsd files)
            if (!(systemId.endsWith(".xsd") || systemId.endsWith(".dtd"))) {
                path += ".xsd";
            }
        } else {
            LOG.error("Unable to resolve system id '" + systemId + "' locally...delegating to default resolution strategy.");
            return null;
        }
        InputStream is = getClass().getClassLoader().getResourceAsStream(path);
        if (is == null) {
            String message = "Unable to find schema (" + path + ") for: " + systemId;
            LOG.error(message);
            throw new SAXException(message);
        }
        return new InputSource(is);
    }
}
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation249
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation227
        }

        if (!org.apache.commons.lang.StringUtils.isEmpty(groupIdParam) || !org.apache.commons.lang.StringUtils.isEmpty(groupNameParam)) {
            Group group = null;
            if (groupIdParam != null && !"".equals(groupIdParam)) {
                group = getGroupService().getGroup(groupIdParam.trim());
            } else {
                if (groupNamespaceParam == null) {
                    groupNamespaceParam = KimConstants.KIM_GROUP_DEFAULT_NAMESPACE_CODE;
                }
                group = getGroupService().getGroupByName(groupNamespaceParam, groupNameParam.trim());
                if (group == null) {
                    GlobalVariables.getMessageMap().putError(GROUP_REVIEWER_NAMESPACE_PROPERTY_NAME, RiceKeyConstants.ERROR_CUSTOM, INVALID_WORKGROUP_ERROR);
                } else {
                    workgroupId = group.getId();
                }
            }
        }

        Map attributes = null;
        MyColumns myColumns = new MyColumns();
        if (ruleTemplateNameParam != null && !ruleTemplateNameParam.trim().equals("") || ruleTemplateIdParam != null && !"".equals(ruleTemplateIdParam) && !"null".equals(ruleTemplateIdParam)) {
            RuleTemplate ruleTemplate = null;
            if (ruleTemplateIdParam != null && !"".equals(ruleTemplateIdParam)) {
                ruleTemplateId = ruleTemplateIdParam;
                ruleTemplate = getRuleTemplateService().findByRuleTemplateId(ruleTemplateId);
            } else {
                ruleTemplate = getRuleTemplateService().findByRuleTemplateName(ruleTemplateNameParam.trim());
                ruleTemplateId = ruleTemplate.getRuleTemplateId();
            }
FileProjectLine
edu/sampleu/travel/krad/form/UILayoutTestForm.javaRice Sample App380
edu/sampleu/travel/krad/form/UITestForm.javaRice Sample App196
	public void setField12(boolean field12) {
		this.field12 = field12;
	}

	public String getField13() {
		return this.field13;
	}

	public void setField13(String field13) {
		this.field13 = field13;
	}

	public String getField14() {
		return this.field14;
	}

	public void setField14(String field14) {
		this.field14 = field14;
	}

	public String getField15() {
		return this.field15;
	}

	public void setField15(String field15) {
		this.field15 = field15;
	}

	public String getField16() {
		return this.field16;
	}

	public void setField16(String field16) {
		this.field16 = field16;
	}

	public String getField17() {
		return this.field17;
	}

	public void setField17(String field17) {
		this.field17 = field17;
	}

	public String getField18() {
		return this.field18;
	}

	public void setField18(String field18) {
		this.field18 = field18;
	}

	public String getField19() {
		return this.field19;
	}

	public void setField19(String field19) {
		this.field19 = field19;
	}

	public String getField20() {
		return this.field20;
	}

	public void setField20(String field20) {
		this.field20 = field20;
	}

	public String getField21() {
		return this.field21;
	}

	public void setField21(String field21) {
		this.field21 = field21;
	}

	public boolean isField22() {
FileProjectLine
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.javaRice Implementation299
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.javaRice Implementation238
        Criteria ruleResponsibilityNameCrit = null;
        if (!org.apache.commons.lang.StringUtils.isEmpty(workflowId)) {
            // workflow user id exists
            if (searchUser != null && searchUser) {
                // searching user wishes to search for rules specific to user
                ruleResponsibilityNameCrit = new Criteria();
                ruleResponsibilityNameCrit.addLike("ruleResponsibilityName", workflowId);
                ruleResponsibilityNameCrit.addEqualTo("ruleResponsibilityType", KEWConstants.RULE_RESPONSIBILITY_WORKFLOW_ID);
            }
            if ( (searchUserInWorkgroups != null && searchUserInWorkgroups) && (workgroupIds != null) && (!workgroupIds.isEmpty()) ) {
                // at least one workgroup id exists and user wishes to search on workgroups
                if (ruleResponsibilityNameCrit == null) {
                    ruleResponsibilityNameCrit = new Criteria();
                }
                Criteria workgroupCrit = new Criteria();
                workgroupCrit.addIn("ruleResponsibilityName", workgroupIds);
                workgroupCrit.addEqualTo("ruleResponsibilityType", KEWConstants.RULE_RESPONSIBILITY_GROUP_ID);
                ruleResponsibilityNameCrit.addOrCriteria(workgroupCrit);
            }
        } else if ( (workgroupIds != null) && (workgroupIds.size() == 1) ) {
            // no user and one workgroup id
            ruleResponsibilityNameCrit = new Criteria();
            ruleResponsibilityNameCrit.addLike("ruleResponsibilityName", workgroupIds.iterator().next());
            ruleResponsibilityNameCrit.addEqualTo("ruleResponsibilityType", KEWConstants.RULE_RESPONSIBILITY_GROUP_ID);
        } else if ( (workgroupIds != null) && (workgroupIds.size() > 1) ) {
            // no user and more than one workgroup id
            ruleResponsibilityNameCrit = new Criteria();
            ruleResponsibilityNameCrit.addIn("ruleResponsibilityName", workgroupIds);
            ruleResponsibilityNameCrit.addEqualTo("ruleResponsibilityType", KEWConstants.RULE_RESPONSIBILITY_GROUP_ID);
        }
        if (ruleResponsibilityNameCrit != null) {
FileProjectLine
org/kuali/rice/kew/engine/node/RequestActivationNode.javaRice Implementation91
org/kuali/rice/kew/engine/node/RoleNode.javaRice Implementation171
	public boolean activateRequests(RouteContext context, DocumentRouteHeaderValue document,
			RouteNodeInstance nodeInstance) throws WorkflowException {
		MDC.put( "docId", document.getDocumentId() );
		PerformanceLogger performanceLogger = new PerformanceLogger( document.getDocumentId() );
		List<ActionItem> generatedActionItems = new ArrayList<ActionItem>();
		List<ActionRequestValue> requests = new ArrayList<ActionRequestValue>();
		if ( context.isSimulation() ) {
			for ( ActionRequestValue ar : context.getDocument().getActionRequests() ) {
				// logic check below duplicates behavior of the
				// ActionRequestService.findPendingRootRequestsByDocIdAtRouteNode(documentId,
				// routeNodeInstanceId) method
				if ( ar.getCurrentIndicator()
						&& (ActionRequestStatus.INITIALIZED.getCode().equals( ar.getStatus() ) || ActionRequestStatus.ACTIVATED.getCode()
								.equals( ar.getStatus() ))
						&& ar.getNodeInstance().getRouteNodeInstanceId().equals(
								nodeInstance.getRouteNodeInstanceId() )
						&& ar.getParentActionRequest() == null ) {
					requests.add( ar );
				}
			}
			requests.addAll( context.getEngineState().getGeneratedRequests() );
		} else {
			requests = KEWServiceLocator.getActionRequestService()
					.findPendingRootRequestsByDocIdAtRouteNode( document.getDocumentId(),
							nodeInstance.getRouteNodeInstanceId() );
		}
		if ( LOG.isDebugEnabled() ) {
			LOG.debug( "Pending Root Requests " + requests.size() );
		}
		boolean requestActivated = activateRequestsCustom( context, requests, generatedActionItems,
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToOneDescriptor.javaRice Core Framework29
org/kuali/rice/core/framework/persistence/jpa/metadata/ObjectDescriptor.javaRice Core Framework117
		sb.append("ObjectDescriptor = [ ");
		sb.append("targetEntity:").append(targetEntity.getName()).append(", ");
		sb.append("cascade = { ");
		for (CascadeType ct : cascade) {
			sb.append(ct).append(" ");
		}
		sb.append("}, ");
		sb.append("fetch:").append(fetch).append(", ");
		sb.append("optional:").append(optional);
		if (!joinColumnDescriptors.isEmpty()) {
			sb.append(", join columns = { ");
			for (JoinColumnDescriptor joinColumnDescriptor : joinColumnDescriptors) {				
				sb.append(" jc = { ");
				sb.append("name:").append(joinColumnDescriptor.getName()).append(", ");
				sb.append("insertable:").append(joinColumnDescriptor.isInsertable()).append(", ");
				sb.append("nullable:").append(joinColumnDescriptor.isNullable()).append(", ");
				sb.append("unique:").append(joinColumnDescriptor.isUnique()).append(", ");
				sb.append("updateable:").append(joinColumnDescriptor.isUpdateable());
				sb.append(" }");
			}
			sb.append(" } ");
		}
		sb.append(" ]");
		return sb.toString();
	}
	
}
FileProjectLine
org/kuali/rice/krad/document/authorization/DocumentAuthorizerBase.javaRice KRAD Web Framework227
org/kuali/rice/krad/uif/authorization/DocumentAuthorizerBase.javaRice KRAD Web Framework210
						.getPrincipalId(), additionalPermissionDetails, null);
	}
	
	public boolean canEditDocumentOverview(Document document, Person user){
		return isAuthorizedByTemplate(document,
				KRADConstants.KRAD_NAMESPACE,
				KimConstants.PermissionTemplateNames.EDIT_DOCUMENT,
				user.getPrincipalId()) && this.isDocumentInitiator(document, user);
	}
	
	protected final boolean canSendAnyTypeAdHocRequests(Document document, Person user) {
		if (canSendAdHocRequests(document, KEWConstants.ACTION_REQUEST_FYI_REQ, user)) {
		    RoutePath routePath = KewApiServiceLocator.getDocumentTypeService().getRoutePathForDocumentTypeName(document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName());
		    ProcessDefinition processDefinition = routePath.getPrimaryProcess();
		    if (processDefinition != null) {
		        if (processDefinition.getInitialRouteNode() == null) {
		            return false;
		        }
		    } else {
		        return false;
		    }
		    return true;
		} else if(canSendAdHocRequests(document, KEWConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ, user)){
			return true;
		}
		return canSendAdHocRequests(document, KEWConstants.ACTION_REQUEST_APPROVE_REQ, user);
	}

	protected boolean canTakeRequestedAction(Document document,
			String actionRequestCode, Person user) {
		Map<String, String> additionalPermissionDetails = new HashMap<String, String>();
		additionalPermissionDetails.put(KimConstants.AttributeConstants.ACTION_REQUEST_CD,
				actionRequestCode);
		return isAuthorizedByTemplate(document, KRADConstants.KRAD_NAMESPACE,
				KimConstants.PermissionTemplateNames.TAKE_REQUESTED_ACTION,
				user.getPrincipalId(), additionalPermissionDetails, null);
FileProjectLine
org/kuali/rice/kew/api/doctype/DocumentType.javaRice KEW API148
org/kuali/rice/kew/api/doctype/DocumentType.javaRice KEW API298
            return new DocumentType(this);
        }

        @Override
        public String getId() {
            return this.id;
        }

        @Override
        public String getName() {
            return this.name;
        }

        @Override
        public Integer getDocumentTypeVersion() {
            return this.documentTypeVersion;
        }

        @Override
        public String getLabel() {
            return this.label;
        }

        @Override
        public String getDescription() {
            return this.description;
        }

        @Override
        public String getParentId() {
            return this.parentId;
        }

        @Override
        public boolean isActive() {
            return this.active;
        }

        @Override
        public String getDocHandlerUrl() {
            return this.docHandlerUrl;
        }
        
        @Override
        public String getHelpDefinitionUrl() {
            return this.helpDefinitionUrl;
        }

        @Override
        public String getDocSearchHelpUrl() {
            return this.docSearchHelpUrl;
        }

        @Override
        public String getPostProcessorName() {
            return this.postProcessorName;
        }

        @Override
        public String getApplicationId() {
            return this.applicationId;
        }

        @Override
        public boolean isCurrent() {
            return this.current;
        }

        @Override
        public String getBlanketApproveGroupId() {
            return this.blanketApproveGroupId;
        }

        @Override
        public String getSuperUserGroupId() {
            return this.superUserGroupId;
        }

        @Override
        public Map<DocumentTypePolicy, String> getPolicies() {
            return this.policies;
        }

        @Override
        public Long getVersionNumber() {
            return this.versionNumber;
        }

        public void setId(String id) {
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.javaRice Implementation230
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.javaRice Implementation141
        persistenceDao.retrieveReference(persistableObject, referenceObjectName);
    }

    /**
	 * @see org.kuali.rice.krad.service.PersistenceService#retrieveReferenceObject(java.lang.Object,
	 *      String referenceObjectName)
     */
    public void retrieveReferenceObjects(Object persistableObject, List referenceObjectNames) {
        if (persistableObject == null) {
            throw new IllegalArgumentException("invalid (null) persistableObject");
        }
        if (referenceObjectNames == null) {
            throw new IllegalArgumentException("invalid (null) referenceObjectNames");
        }
        if (referenceObjectNames.isEmpty()) {
            throw new IllegalArgumentException("invalid (empty) referenceObjectNames");
        }

        int index = 0;
        for (Iterator i = referenceObjectNames.iterator(); i.hasNext(); index++) {
            String referenceObjectName = (String) i.next();
            if (StringUtils.isBlank(referenceObjectName)) {
                throw new IllegalArgumentException("invalid (blank) name at position " + index);
            }

            retrieveReferenceObject(persistableObject, referenceObjectName);
        }
    }

    /**
	 * @see org.kuali.rice.krad.service.PersistenceService#retrieveReferenceObject(java.lang.Object,
	 *      String referenceObjectName)
     */
    public void retrieveReferenceObjects(List persistableObjects, List referenceObjectNames) {
        if (persistableObjects == null) {
            throw new IllegalArgumentException("invalid (null) persistableObjects");
        }
        if (persistableObjects.isEmpty()) {
            throw new IllegalArgumentException("invalid (empty) persistableObjects");
        }
        if (referenceObjectNames == null) {
            throw new IllegalArgumentException("invalid (null) referenceObjectNames");
        }
        if (referenceObjectNames.isEmpty()) {
            throw new IllegalArgumentException("invalid (empty) referenceObjectNames");
        }

        for (Iterator i = persistableObjects.iterator(); i.hasNext();) {
            Object persistableObject = i.next();
            retrieveReferenceObjects(persistableObject, referenceObjectNames);
        }
    }
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation580
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation530
                }
            }

            ResultRow row = new ResultRow(columns, returnUrl.constructCompleteHtmlTag(), actionUrls);
            row.setRowId(returnUrl.getName());
            row.setReturnUrlHtmlData(returnUrl);
            // because of concerns of the BO being cached in session on the ResultRow,
            // let's only attach it when needed (currently in the case of export)
            if (getBusinessObjectDictionaryService().isExportable(getBusinessObjectClass())) {
                row.setBusinessObject(element);
            }
            if(element instanceof PersistableBusinessObject){
                row.setObjectId((((PersistableBusinessObject)element).getObjectId()));
            }


            boolean rowReturnable = isResultReturnable(element);
            row.setRowReturnable(rowReturnable);
            if (rowReturnable) {
                hasReturnableRow = true;
            }
            resultTable.add(row);
        }

        lookupForm.setHasReturnableRow(hasReturnableRow);

        return displayList;
    }

    @Override
    public List<Column> getColumns() {
        List<Column> columns = super.getColumns();
        for (Row row : rows) {
            for (Field field : row.getFields()) {
                Column newColumn = new Column();
                newColumn.setColumnTitle(field.getFieldLabel());
                newColumn.setMaxLength(field.getMaxLength());
                newColumn.setPropertyName(field.getPropertyName());
                columns.add(newColumn);
            }
        }
        return columns;
    }

    @Override
    public List<HtmlData> getCustomActionUrls(BusinessObject businessObject,
            List pkNames) {
FileProjectLine
org/kuali/rice/edl/impl/config/EDLConfigurer.javaRice EDL Impl86
org/kuali/rice/kew/config/KEWConfigurer.javaRice Implementation121
	}

	@Override
	public void addAdditonalToConfig() {
		configureDataSource();
	}

	private void configureDataSource() {
		if (getDataSource() != null) {
			ConfigContext.getCurrentContextConfig().putObject(KEW_DATASOURCE_OBJ, getDataSource());
		}
	}

	@Override
	public Collection<ResourceLoader> getResourceLoadersToRegister() throws Exception {
		// create the plugin registry
		PluginRegistry registry = null;
		String pluginRegistryEnabled = ConfigContext.getCurrentContextConfig().getProperty("plugin.registry.enabled");
		if (!StringUtils.isBlank(pluginRegistryEnabled) && Boolean.valueOf(pluginRegistryEnabled).booleanValue()) {
			registry = new PluginRegistryFactory().createPluginRegistry();
		}

		final Collection<ResourceLoader> rls = new ArrayList<ResourceLoader>();
		for (ResourceLoader rl : RiceResourceLoaderFactory.getSpringResourceLoaders()) {
			CoreResourceLoader coreResourceLoader = 
				new CoreResourceLoader(rl, registry);
			coreResourceLoader.start();

			//wait until core resource loader is started to attach to GRL;  this is so startup
			//code can depend on other things hooked into GRL without incomplete KEW resources
			//messing things up.

			GlobalResourceLoader.addResourceLoader(coreResourceLoader);

			// now start the plugin registry if there is one
			if (registry != null) {
				registry.start();
				// the registry resourceloader is now being handled by the CoreResourceLoader
				//GlobalResourceLoader.addResourceLoader(registry);
			}
			rls.add(coreResourceLoader);
		}

		return rls;
	}

	private ClientProtocol getClientProtocol() {
		return ClientProtocol.valueOf(ConfigContext.getCurrentContextConfig().getProperty("client.protocol"));
	}

	public DataSource getDataSource() {
		return dataSource;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}
}
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/type/HibernateKualiEncryptDecryptUserType.javaRice Core Framework34
org/kuali/rice/core/framework/persistence/jpa/type/KualiDecimalIntegerPercentFieldType.javaRice Core Framework34
public class KualiDecimalIntegerPercentFieldType extends HibernateImmutableValueUserType implements UserType {
	/**
	 * Retrieves a value from the given ResultSet and decrypts it
	 * 
	 * @see org.hibernate.usertype.UserType#nullSafeGet(java.sql.ResultSet, java.lang.String[], java.lang.Object)
	 */
	public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
		String value = rs.getString(names[0]);
		String converted = null;

		if (value != null) {
	        try {
	            converted = CoreApiServiceLocator.getEncryptionService().decrypt(value);
	        }
	        catch (GeneralSecurityException gse) {
	            throw new RuntimeException("Unable to decrypt value from db: " + gse.getMessage());
	        }
	        
	        if (converted == null) {
				converted = value;
			}
		}

        return converted;
	}

	/**
	 * Encrypts the value if possible and then sets that on the PreparedStatement
	 * 
	 * @see org.hibernate.usertype.UserType#nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int)
	 */
	public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
		String converted = null;

		if (value != null) {
	        try {
	            converted = CoreApiServiceLocator.getEncryptionService().encrypt(value);
	        }
	        catch (GeneralSecurityException gse) {
	            throw new RuntimeException("Unable to encrypt value to db: " + gse.getMessage());
	        }
		}
        
        if (converted == null) {
        	st.setNull(index, Types.VARCHAR);
        } else {
        	st.setString(index, converted);
        }
	}

	/**
	 * Returns String.class
	 * 
	 * @see org.hibernate.usertype.UserType#returnedClass()
	 */
	public Class returnedClass() {
		return String.class;
	}

	/**
	 * Returns an array with the SQL VARCHAR type as the single member
	 * 
	 * @see org.hibernate.usertype.UserType#sqlTypes()
	 */
	public int[] sqlTypes() {
		return new int[] { Types.VARCHAR };
	}

}
FileProjectLine
org/kuali/rice/krad/bo/JpaToDdl.javaRice Implementation81
org/kuali/rice/krad/bo/JpaToOjbMetadata.javaRice Implementation79
	private static void getClassFields( Class<? extends Object> clazz, StringBuffer sb, Map<String,AttributeOverride> overrides ) {
		// first get annotation overrides
		if ( overrides == null ) {
			overrides = new HashMap<String,AttributeOverride>();
		}
		if ( clazz.getAnnotation( AttributeOverride.class ) != null ) {
			AttributeOverride ao = (AttributeOverride)clazz.getAnnotation( AttributeOverride.class );
			if ( !overrides.containsKey(ao.name() ) ) {
				overrides.put(ao.name(), ao);
			}
		}
		if ( clazz.getAnnotation( AttributeOverrides.class ) != null ) {
			for ( AttributeOverride ao : ((AttributeOverrides)clazz.getAnnotation( AttributeOverrides.class )).value() ) {
				if ( !overrides.containsKey(ao.name() ) ) {
					overrides.put(ao.name(), ao);
				}
				overrides.put(ao.name(),ao);
			}
		}
		for ( Field field : clazz.getDeclaredFields() ) {
			Id id = (Id)field.getAnnotation( Id.class );
			Column column = (Column)field.getAnnotation( Column.class );
			if ( column != null ) {
				sb.append( "		<field-descriptor name=\"" );
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation1251
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.javaRice LDAP Connector258
	}

    protected List<PersonDocumentAddress> loadAddresses(IdentityManagementPersonDocument identityManagementPersonDocument, String principalId, List<EntityAddress> entityAddresses, boolean suppressDisplay ) {
		List<PersonDocumentAddress> docAddresses = new ArrayList<PersonDocumentAddress>();
		if(ObjectUtils.isNotNull(entityAddresses)){
			for (EntityAddress address: entityAddresses) {
				if(address.isActive()){
					PersonDocumentAddress docAddress = new PersonDocumentAddress();
					docAddress.setEntityTypeCode(address.getEntityTypeCode());
					docAddress.setAddressTypeCode(address.getAddressType().getCode());

					//We do not need to check the privacy setting here - The UI should care of it
					docAddress.setLine1(address.getLine1Unmasked());
					docAddress.setLine2(address.getLine2Unmasked());
					docAddress.setLine3(address.getLine3Unmasked());
					docAddress.setStateCode(address.getStateCodeUnmasked());
					docAddress.setPostalCode(address.getPostalCodeUnmasked());
					docAddress.setCountryCode(address.getCountryCodeUnmasked());
					docAddress.setCity(address.getCityUnmasked());

					docAddress.setActive(address.isActive());
					docAddress.setDflt(address.isDefaultValue());
					docAddress.setEntityAddressId(address.getId());
					docAddress.setEdit(true);
					docAddresses.add(docAddress);
				}
			}
		}
		return docAddresses;
	}

    protected List<PersonDocumentEmail> loadEmails(IdentityManagementPersonDocument identityManagementPersonDocument, String principalId, List<EntityEmail> entityEmails, boolean suppressDisplay ) {
FileProjectLine
org/kuali/rice/kns/lookup/KualiLookupableHelperServiceImpl.javaRice KNS316
org/kuali/rice/krad/lookup/LookupableImpl.javaRice KRAD Web Framework344
                    getDataObjectMetaDataService().getDictionaryRelationship(eboParentClass, eboPropertyName);
            if (LOG.isDebugEnabled()) {
                LOG.debug("Obtained RelationshipDefinition for " + eboPropertyName);
                LOG.debug(rd);
            }

            // copy the needed properties (primary only) to the field values KULRICE-4446 do
            // so only if the relationship definition exists
            // NOTE: this will work only for single-field PK unless the ORM
            // layer is directly involved
            // (can't make (field1,field2) in ( (v1,v2),(v3,v4) ) style
            // queries in the lookup framework
            if (ObjectUtils.isNotNull(rd)) {
                if (rd.getPrimitiveAttributes().size() > 1) {
                    throw new RuntimeException(
                            "EBO Links don't work for relationships with multiple-field primary keys.");
                }
                String boProperty = rd.getPrimitiveAttributes().get(0).getSourceName();
                String eboProperty = rd.getPrimitiveAttributes().get(0).getTargetName();
                StringBuffer boPropertyValue = new StringBuffer();

                // loop over the results, making a string that the lookup
                // DAO will convert into an
                // SQL "IN" clause
                for (Object ebo : eboResults) {
                    if (boPropertyValue.length() != 0) {
                        boPropertyValue.append(SearchOperator.OR.op());
                    }
                    try {
                        boPropertyValue.append(PropertyUtils.getProperty(ebo, eboProperty).toString());
                    } catch (Exception ex) {
                        LOG.warn("Unable to get value for " + eboProperty + " on " + ebo);
                    }
                }

                if (eboParentPropertyName == null) {
                    // non-nested property containing the EBO
                    nonEboFieldValues.put(boProperty, boPropertyValue.toString());
                } else {
                    // property nested within the main searched-for BO that
                    // contains the EBO
                    nonEboFieldValues.put(eboParentPropertyName + "." + boProperty, boPropertyValue.toString());
                }
            }
        }
FileProjectLine
org/kuali/rice/kew/engine/node/IteratedRequestActivationNode.javaRice Implementation250
org/kuali/rice/kew/engine/node/RequestActivationNode.javaRice Implementation151
    protected boolean activateRequest(RouteContext context, ActionRequestValue actionRequest, RouteNodeInstance nodeInstance, List generatedActionItems) {
        if (actionRequest.isRoleRequest()) {
            List actionRequests = KEWServiceLocator.getActionRequestService().findPendingRootRequestsByDocIdAtRouteNode(actionRequest.getDocumentId(), nodeInstance.getRouteNodeInstanceId());
            for (Iterator iterator = actionRequests.iterator(); iterator.hasNext();) {
                ActionRequestValue siblingRequest = (ActionRequestValue) iterator.next();
                if (actionRequest.getRoleName().equals(siblingRequest.getRoleName())) {
                    generatedActionItems.addAll(KEWServiceLocator.getActionRequestService().activateRequestNoNotification(siblingRequest, context.getActivationContext()));
                }
            }
        }
        generatedActionItems.addAll(KEWServiceLocator.getActionRequestService().activateRequestNoNotification(actionRequest, context.getActivationContext()));
        return actionRequest.isApproveOrCompleteRequest() && ! actionRequest.isDone();
    }
    
    protected void saveActionRequest(RouteContext context, ActionRequestValue actionRequest) {
        if (!context.isSimulation()) {
            KEWServiceLocator.getActionRequestService().saveActionRequest(actionRequest);
        } else {
            actionRequest.setActionRequestId(String.valueOf(generatedRequestPriority++));
            context.getEngineState().getGeneratedRequests().add(actionRequest);    
        }
        
    }
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl94
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl200
                editorDocument.setContext(context);
            }
        }
        
        return super.refresh(form, result, request, response);
    }

    /**
     * This override is used to populate the agenda from the agenda name and context selection of the user.
     * It is triggered by the refreshWhenChanged property of the MaintenanceView.
     */
    @RequestMapping(method = RequestMethod.POST, params = "methodToCall=updateComponent")
    @Override
    public ModelAndView updateComponent(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
            HttpServletRequest request, HttpServletResponse response) {

        MaintenanceForm maintenanceForm = (MaintenanceForm) form;
        AgendaEditor editorDocument =
                ((AgendaEditor) maintenanceForm.getDocument().getNewMaintainableObject().getDataObject());
        final Map<String, Object> map = new HashMap<String, Object>();
        map.put("name", editorDocument.getAgenda().getName());
        map.put("contextId", editorDocument.getContext().getId());

        AgendaBo agenda = getBusinessObjectService().findByPrimaryKey(AgendaBo.class, Collections.unmodifiableMap(map));
        editorDocument.setAgenda(agenda);

        return super.updateComponent(form, result, request, response);
    }

    /**
     * This method updates the existing rule in the agenda.
     */
    @RequestMapping(params = "methodToCall=" + "goToAddRule")
    public ModelAndView goToAddRule(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
FileProjectLine
org/kuali/rice/kns/service/impl/BusinessObjectMetaDataServiceImpl.javaRice Implementation202
org/kuali/rice/krad/service/impl/DataObjectMetaDataServiceImpl.javaRice Implementation303
        DataObjectRelationship relationship = new DataObjectRelationship(dataObjectClass,
                ddReference.getObjectAttributeName(), ddReference.getTargetClass());

        for (PrimitiveAttributeDefinition def : ddReference.getPrimitiveAttributes()) {
            if (StringUtils.isNotBlank(attributePrefix)) {
                relationship.getParentToChildReferences().put(attributePrefix + "." + def.getSourceName(),
                        def.getTargetName());
            } else {
                relationship.getParentToChildReferences().put(def.getSourceName(), def.getTargetName());
            }
        }

        if (!keysOnly) {
            for (SupportAttributeDefinition def : ddReference.getSupportAttributes()) {
                if (StringUtils.isNotBlank(attributePrefix)) {
                    relationship.getParentToChildReferences().put(attributePrefix + "." + def.getSourceName(),
                            def.getTargetName());
                    if (def.isIdentifier()) {
                        relationship.setUserVisibleIdentifierKey(attributePrefix + "." + def.getSourceName());
                    }
                } else {
                    relationship.getParentToChildReferences().put(def.getSourceName(), def.getTargetName());
                    if (def.isIdentifier()) {
                        relationship.setUserVisibleIdentifierKey(def.getSourceName());
                    }
                }
            }
        }

        return relationship;
    }
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceStructureServiceJpaImpl.javaRice Implementation341
org/kuali/rice/krad/service/impl/PersistenceStructureServiceOjbImpl.javaRice Implementation357
				throw new RuntimeException("The number of foriegn keys dont match the number of primary " + "keys for the reference '" + attributeName + "', on BO of type '" + clazz.getName() + "'.  " + "This should never happen under normal circumstances, as it means that the OJB repository " + "files are misconfigured.");
			}

			// get the field name of the fk & pk field
			String fkFieldName = (String) fkIterator.next();
			String pkFieldName = (String) pkIterator.next();

			// add the fieldName and fieldType to the map
			fkMap.put(fkFieldName, pkFieldName);
		}
		
		return fkMap;
	}

	
	public Map<String, String> getInverseForeignKeysForCollection(Class boClass, String collectionName) {
		// yelp if nulls were passed in
		if (boClass == null) {
			throw new IllegalArgumentException("The Class passed in for the boClass argument was null.");
		}
		if (collectionName == null) {
			throw new IllegalArgumentException("The String passed in for the attributeName argument was null.");
		}

		PropertyDescriptor propertyDescriptor = null;

		// make an instance of the class passed
		Object classInstance;
		try {
			classInstance = boClass.newInstance();
		} catch (Exception e) {
			throw new RuntimeException(e);
		}

		// make sure the attribute exists at all, throw exception if not
		try {
			propertyDescriptor = PropertyUtils.getPropertyDescriptor(classInstance, collectionName);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
		if (propertyDescriptor == null) {
			throw new ReferenceAttributeDoesntExistException("Requested attribute: '" + collectionName + "' does not exist " + "on class: '" + boClass.getName() + "'. GFK");
		}

		// get the class of the attribute name
		Class attributeClass = propertyDescriptor.getPropertyType();

		// make sure the class of the attribute descends from BusinessObject,
		// otherwise throw an exception
		if (!Collection.class.isAssignableFrom(attributeClass)) {
			throw new ObjectNotABusinessObjectRuntimeException("Attribute requested (" + collectionName + ") is of class: " + "'" + attributeClass.getName() + "' and is not a " + "descendent of Collection");
		}
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation1714
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.javaRice LDAP Connector342
	}

    public BusinessObject getMember(String memberTypeCode, String memberId){
        Class<? extends BusinessObject> roleMemberTypeClass = null;
        String roleMemberIdName = "";
    	if(KimConstants.KimUIConstants.MEMBER_TYPE_PRINCIPAL_CODE.equals(memberTypeCode)){
        	roleMemberTypeClass = PrincipalBo.class;
        	roleMemberIdName = KimConstants.PrimaryKeyConstants.PRINCIPAL_ID;
	 	 	Principal principalInfo = getIdentityService().getPrincipal(memberId);
	 	 	if (principalInfo != null) {
	 	 		
	 	 	}
        } else if(KimConstants.KimUIConstants.MEMBER_TYPE_GROUP_CODE.equals(memberTypeCode)){
        	roleMemberTypeClass = GroupBo.class;
        	roleMemberIdName = KimConstants.PrimaryKeyConstants.GROUP_ID;
        	Group groupInfo = null;
	 	 	groupInfo = getGroupService().getGroup(memberId);
	 	 	if (groupInfo != null) {
	 	 		
	 	 	}
        } else if(KimConstants.KimUIConstants.MEMBER_TYPE_ROLE_CODE.equals(memberTypeCode)){
        	roleMemberTypeClass = RoleBo.class;
        	roleMemberIdName = KimConstants.PrimaryKeyConstants.ROLE_ID;
	 	 	Role role = getRoleService().getRole(memberId);
	 	 	if (role != null) {
	 	 		
	 	 	}
        }
        Map<String, String> criteria = new HashMap<String, String>();
        criteria.put(roleMemberIdName, memberId);
        return getBusinessObjectService().findByPrimaryKey(roleMemberTypeClass, criteria);
    }
FileProjectLine
org/kuali/rice/edl/impl/service/impl/EDocLiteServiceImpl.javaRice EDL Impl211
org/kuali/rice/edl/impl/xml/EDocLiteXmlParser.javaRice EDL Impl200
            throw new XmlIngestionException("Invalid EDocLiteDefinition", xpee);
        }

        if (fields != null) {
            Collection invalidAttributes = new ArrayList(5);
            for (int i = 0; i < fields.getLength(); i++) {
                Node node = (Node) fields.item(i);
                // they should all be Element...
                if (node instanceof Element) {
                    Element field = (Element) node;
                    // rely on XML validation to ensure this is present
                    String fieldName = field.getAttribute("name");
                    String attribute = field.getAttribute("attributeName");
                    if (attribute != null && attribute.length() > 0) {
                        RuleAttribute ruleAttrib = KEWServiceLocator.getRuleAttributeService().findByName(attribute);
                        if (ruleAttrib == null) {
                            LOG.error("Invalid attribute referenced in EDocLite definition: " + attribute);
                            invalidAttributes.add("Attribute '" + attribute + "' referenced in field '" + fieldName + "' not found");
                        }
                    }
                }
            }
            if (invalidAttributes.size() > 0) {
                LOG.error("Invalid attributes referenced in EDocLite definition");
                StringBuffer message = new StringBuffer("EDocLite definition contains references to non-existent attributes;\n");
                Iterator it = invalidAttributes.iterator();
                while (it.hasNext()) {
                    message.append(it.next());
                    message.append("\n");
                }
                throw new XmlIngestionException(message.toString());
FileProjectLine
org/kuali/rice/core/api/parameter/ParameterType.javaRice Core API166
org/kuali/rice/shareddata/api/campus/CampusType.javaRice Shared Data API165
            Builder builder =  new Builder(contract.getCode());
            builder.setName(contract.getName());
            builder.setActive(contract.isActive());
            builder.setVersionNumber(contract.getVersionNumber());
            builder.setObjectId(contract.getObjectId());
            return builder;
        }

		/**
		 * Sets the value of the code on this builder to the given value.
		 * 
		 * @param code the code value to set, must not be null or blank
		 * @throws IllegalArgumentException if the code is null or blank
		 */
        public void setCode(String code) {
            if (StringUtils.isBlank(code)) {
                throw new IllegalArgumentException("code is blank");
            }
            this.code = code;
        }

		public void setName(String name) {
			this.name = name;
		}

		public void setActive(boolean active) {
			this.active = active;
		}

        public void setVersionNumber(Long versionNumber) {
            this.versionNumber = versionNumber;
        }
        
        public void setObjectId(String objectId) {
        	this.objectId = objectId;
        }

		@Override
		public String getCode() {
			return code;
		}

		@Override
		public String getName() {
			return name;
		}

		@Override
		public boolean isActive() {
			return active;
		}

        @Override
        public Long getVersionNumber() {
            return versionNumber;
        }
        
        @Override
    	public String getObjectId() {
    		return objectId;
    	}

		/**
		 * Builds an instance of a CampusType based on the current state of the builder.
		 * 
		 * @return the fully-constructed CampusType
		 */
        @Override
        public CampusType build() {
FileProjectLine
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.javaRice Implementation127
org/kuali/rice/kew/actionlist/web/ActionListAction.javaRice Implementation474
    }

    private DocumentRouteHeaderValueActionListExtension toDocumentRouteHeaderValueActionListExtension(
			DocumentRouteHeaderValue routeHeader) {

		if(routeHeader==null){
			return null;
		}
		
		DocumentRouteHeaderValueActionListExtension extension = new DocumentRouteHeaderValueActionListExtension();
		
		extension.setDocumentId(routeHeader.getDocumentId());
		extension.setDocumentTypeId(routeHeader.getDocumentTypeId());
		extension.setDocRouteStatus(routeHeader.getDocRouteStatus());
		extension.setDocRouteLevel(routeHeader.getDocRouteLevel());
		extension.setStatusModDate(routeHeader.getStatusModDate());
		extension.setCreateDate(routeHeader.getCreateDate());
		extension.setApprovedDate(routeHeader.getApprovedDate());
		extension.setFinalizedDate(routeHeader.getFinalizedDate());
		extension.setRouteStatusDate(routeHeader.getRouteStatusDate());
		extension.setRouteLevelDate(routeHeader.getRouteLevelDate());
		extension.setDocTitle(routeHeader.getDocTitle());
		extension.setAppDocId(routeHeader.getAppDocId());
		extension.setDocVersion(routeHeader.getDocVersion());
		extension.setInitiatorWorkflowId(routeHeader.getInitiatorWorkflowId());
		extension.setVersionNumber(routeHeader.getVersionNumber());
		extension.setAppDocStatus(routeHeader.getAppDocStatus());
		extension.setAppDocStatusDate(routeHeader.getAppDocStatusDate());

		return extension;
	}
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl646
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl697
        String selectedItemId = request.getParameter(AGENDA_ITEM_SELECTED);
        AgendaItemBo node = getAgendaItemById(firstItem, selectedItemId);
        AgendaItemBo parent = getParent(firstItem, selectedItemId);

        AgendaItemBo bogusRootNode = null;
        if (parent == null) {
            // special case, this is a top level sibling. rig up special parent node
            bogusRootNode = new AgendaItemBo();
            AgendaItemChildAccessor.whenFalse.setChild(bogusRootNode, firstItem);
            parent = bogusRootNode;
        }

        AgendaItemInstanceChildAccessor accessorToSelectedNode = getInstanceAccessorToChild(parent, node.getId());
        AgendaItemBo olderSibling = (accessorToSelectedNode.getInstance() == parent) ? null : accessorToSelectedNode.getInstance();

        if (olderSibling != null) {
            accessorToSelectedNode.setChild(node.getAlways());
            AgendaItemInstanceChildAccessor yougestWhenFalseSiblingInsertionPoint =
                    getLastChildsAlwaysAccessor(new AgendaItemInstanceChildAccessor(AgendaItemChildAccessor.whenFalse, olderSibling));
            yougestWhenFalseSiblingInsertionPoint.setChild(node);
            AgendaItemChildAccessor.always.setChild(node, null);
        } else if (node.getAlways() != null) { // has younger sibling
            accessorToSelectedNode.setChild(node.getAlways());
            AgendaItemBo childsWhenTrue = node.getAlways().getWhenTrue();
            AgendaItemChildAccessor.whenTrue.setChild(node.getAlways(), node);
            AgendaItemChildAccessor.always.setChild(node, childsWhenTrue);
        }

        if (bogusRootNode != null) {
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation73
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation233
        Criteria criteria = new Criteria();
        // iterate through the parameter map for key values search criteria
        Iterator propsIter = formProps.keySet().iterator();
        while (propsIter.hasNext()) {
            String propertyName = (String) propsIter.next();
            String searchValue = (String) formProps.get(propertyName);

            // if searchValue is empty and the key is not a valid property ignore
            if (StringUtils.isBlank(searchValue) || !(PropertyUtils.isWriteable(example, propertyName))) {
                continue;
            }

            // get property type which is used to determine type of criteria
            Class propertyType = ObjectUtils.getPropertyType(example, propertyName, persistenceStructureService);
            if (propertyType == null) {
                continue;
            }
        	Boolean caseInsensitive = Boolean.TRUE;
        	if ( KRADServiceLocatorWeb.getDataDictionaryService().isAttributeDefined( example.getClass(), propertyName )) {
        		caseInsensitive = !KRADServiceLocatorWeb.getDataDictionaryService().getAttributeForceUppercase( example.getClass(), propertyName );
        	}
        	if ( caseInsensitive == null ) { caseInsensitive = Boolean.TRUE; }

        	boolean treatWildcardsAndOperatorsAsLiteral = KRADServiceLocatorWeb
					.getBusinessObjectDictionaryService().isLookupFieldTreatWildcardsAndOperatorsAsLiteral(example.getClass(), propertyName);
        	
    		if (!caseInsensitive) { 
    			// Verify that the searchValue is uppercased if caseInsensitive is false 
    			searchValue = searchValue.toUpperCase(); 
    		}
        	
            // build criteria
            addCriteria(propertyName, searchValue, propertyType, caseInsensitive, treatWildcardsAndOperatorsAsLiteral, criteria);
        }
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation739
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.javaRice LDAP Connector229
	}

    
    protected List<PersonDocumentName> loadNames( IdentityManagementPersonDocument personDoc, String principalId, List <EntityName> names, boolean suppressDisplay ) {
		List<PersonDocumentName> docNames = new ArrayList<PersonDocumentName>();
		if(ObjectUtils.isNotNull(names)){
			for (EntityName name: names) {
				if(name.isActive()){
					PersonDocumentName docName = new PersonDocumentName();
                    if (name.getNameType() != null) {
					    docName.setNameCode(name.getNameType().getCode());
                    }

					//We do not need to check the privacy setting here - The UI should care of it
					docName.setFirstName(name.getFirstNameUnmasked());
					docName.setLastName(name.getLastNameUnmasked());
					docName.setMiddleName(name.getMiddleNameUnmasked());
					docName.setNamePrefix(name.getNamePrefixUnmasked());
					docName.setNameSuffix(name.getNameSuffixUnmasked());

					docName.setActive(name.isActive());
					docName.setDflt(name.isDefaultValue());
					docName.setEdit(true);
					docName.setEntityNameId(name.getId());
					docNames.add(docName);
				}
			}
		}
		return docNames;
	}
FileProjectLine
org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.javaRice KNS142
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.javaRice KRAD Web Framework106
    }

    /**
     * @see org.kuali.rice.krad.maintenance.rules.MaintenanceDocumentRule#processSaveDocument(org.kuali.rice.krad.document.Document)
     */
    @Override
    public boolean processSaveDocument(Document document) {
        MaintenanceDocument maintenanceDocument = (MaintenanceDocument) document;

        // remove all items from the errorPath temporarily (because it may not
        // be what we expect, or what we need)
        clearErrorPath();

        // setup convenience pointers to the old & new bo
        setupBaseConvenienceObjects(maintenanceDocument);

        // the document must be in a valid state for saving. this does not include business
        // rules, but just enough testing that the document is populated and in a valid state
        // to not cause exceptions when saved. if this passes, then the save will always occur,
        // regardless of business rules.
        if (!isDocumentValidForSave(maintenanceDocument)) {
            resumeErrorPath();
            return false;
        }

        // apply rules that are specific to the class of the maintenance document
        // (if implemented). this will always succeed if not overloaded by the
        // subclass
        processCustomSaveDocumentBusinessRules(maintenanceDocument);

        // return the original set of items to the errorPath
        resumeErrorPath();

        // return the original set of items to the errorPath, to ensure no impact
        // on other upstream or downstream items that rely on the errorPath
        return true;
    }

    /**
     * @see org.kuali.rice.krad.maintenance.rules.MaintenanceDocumentRule#processRouteDocument(org.kuali.rice.krad.document.Document)
     */
    @Override
    public boolean processRouteDocument(Document document) {
        LOG.info("processRouteDocument called");

        MaintenanceDocument maintenanceDocument = (MaintenanceDocument) document;

        // get the documentAuthorizer for this document
        MaintenanceDocumentAuthorizer documentAuthorizer =
                (MaintenanceDocumentAuthorizer) getDocumentHelperService().getDocumentAuthorizer(document);

        // remove all items from the errorPath temporarily (because it may not
        // be what we expect, or what we need)
        clearErrorPath();

        // setup convenience pointers to the old & new bo
        setupBaseConvenienceObjects(maintenanceDocument);

        // apply rules that are common across all maintenance documents, regardless of class
        processGlobalSaveDocumentBusinessRules(maintenanceDocument);

        // from here on, it is in a default-success mode, and will route unless one of the
        // business rules stop it.
        boolean success = true;

        WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
        if (workflowDocument.isInitiated() || workflowDocument.isSaved()){
        	success &= documentAuthorizer.canCreateOrMaintain((MaintenanceDocument)document, GlobalVariables.getUserSession().getPerson());
            if (success == false) {
                GlobalVariables.getMessageMap()
                        .putError(KRADConstants.DOCUMENT_ERRORS, RiceKeyConstants.AUTHORIZATION_ERROR_DOCUMENT,
                                new String[]{GlobalVariables.getUserSession().getPerson().getPrincipalName(),
                                        "Create/Maintain", getDocumentDictionaryService()
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceStructureServiceJpaImpl.javaRice Implementation519
org/kuali/rice/krad/service/impl/PersistenceStructureServiceOjbImpl.javaRice Implementation549
			String fkFieldName = (String) fkIteratorLegacy.next();

			// get the value for the fk field
			Object fkFieldValue = null;
			try {
				fkFieldValue = PropertyUtils.getSimpleProperty(bo, fkFieldName);
			}

			// abort if the value is not retrievable
			catch (Exception e) {
				throw new RuntimeException(e);
			}

			// test the value
			if (fkFieldValue == null) {
				allFieldsPopulated = false;
				unpopulatedFields.add(fkFieldName);
			} else if (fkFieldValue instanceof String) {
				if (StringUtils.isBlank((String) fkFieldValue)) {
					allFieldsPopulated = false;
					unpopulatedFields.add(fkFieldName);
				} else {
					anyFieldsPopulated = true;
				}
			} else {
				anyFieldsPopulated = true;
			}
		}

		// sanity check. if the flag for all fields populated is set, then
		// there should be nothing in the unpopulatedFields list
		if (allFieldsPopulated) {
			if (!unpopulatedFields.isEmpty()) {
				throw new RuntimeException("The flag is set that indicates all fields are populated, but there " + "are fields present in the unpopulatedFields list.  This should never happen, and indicates " + "that the logic in this method is broken.");
			}
		}
		
		return new ForeignKeyFieldsPopulationState(allFieldsPopulated, anyFieldsPopulated, unpopulatedFields);
	}

	/**
	 * @see org.kuali.rice.krad.service.PersistenceStructureService#listReferenceObjectFieldNames(java.lang.Class)
	 */
	
	public Map<String, Class> listReferenceObjectFields(Class boClass) {
		// validate parameter
		if (boClass == null) {
			throw new IllegalArgumentException("Class specified in the parameter was null.");
		}
		if (!PersistableBusinessObject.class.isAssignableFrom(boClass)) {
			throw new IllegalArgumentException("Class specified [" + boClass.getName() + "] must be a class that " + "inherits from BusinessObject.");
		}
FileProjectLine
org/kuali/rice/krad/document/authorization/DocumentPresentationControllerBase.javaRice KRAD Web Framework170
org/kuali/rice/krad/uif/authorization/DocumentPresentationControllerBase.javaRice KRAD Web Framework242
        }
        // otherwise, limit the display of the blanket approve button to only
        // the initiator of the document
        // (prior to routing)
        WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
        if (canRoute(document)
                && StringUtils.equals(workflowDocument.getInitiatorPrincipalId(), GlobalVariables.getUserSession()
                        .getPrincipalId())) {
            return true;
        }
        // or to a user with an approval action request
        if (workflowDocument.isApprovalRequested()) {
            return true;
        }

        return false;
    }

    protected boolean canApprove(Document document) {
        return true;
    }

    protected boolean canDisapprove(Document document) {
        // most of the time, a person who can approve can disapprove
        return canApprove(document);
    }

    protected boolean canSendAdhocRequests(Document document) {
        WorkflowDocument kualiWorkflowDocument = document.getDocumentHeader().getWorkflowDocument();
        return !(kualiWorkflowDocument.isInitiated() || kualiWorkflowDocument.isSaved());
    }

    protected boolean canSendNoteFyi(Document document) {
        return true;
    }

    protected boolean canEditDocumentOverview(Document document) {
        WorkflowDocument kualiWorkflowDocument = document.getDocumentHeader().getWorkflowDocument();
        return (kualiWorkflowDocument.isInitiated() || kualiWorkflowDocument.isSaved());
    }

    protected boolean canFyi(Document document) {
        return true;
    }

    protected boolean canAcknowledge(Document document) {
        return true;
    }
FileProjectLine
org/kuali/rice/kew/rule/web/WebRuleBaseValues.javaRice Implementation86
org/kuali/rice/kew/rule/web/WebRuleBaseValues.javaRice Implementation192
	public void loadFieldsWithDefaultValues() {
		fields.clear();
		if (getRuleTemplateId() != null) {
			RuleTemplate ruleTemplate = getRuleTemplateService().findByRuleTemplateId(getRuleTemplateId());
			if (ruleTemplate != null) {
				List ruleTemplateAttributes = ruleTemplate.getActiveRuleTemplateAttributes();
				Collections.sort(ruleTemplateAttributes);
				for (Iterator iter = ruleTemplateAttributes.iterator(); iter.hasNext();) {
					RuleTemplateAttribute ruleTemplateAttribute = (RuleTemplateAttribute) iter.next();
					if (!ruleTemplateAttribute.isWorkflowAttribute()) {
						continue;
					}
					WorkflowAttribute workflowAttribute = ruleTemplateAttribute.getWorkflowAttribute();
					RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
					if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) {
						((GenericXMLRuleAttribute) workflowAttribute).setRuleAttribute(ruleAttribute);
					}
					for (Object element : workflowAttribute.getRuleRows()) {
						Row row = (Row) element;
						for (Object element2 : row.getFields()) {
							Field field = (Field) element2;
							if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) {
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation435
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.javaRice Implementation281
            displayList = (List<GroupBo>)getSearchResultsUnbounded(lookupForm.getFieldsForLookup());
        }

        HashMap<String,Class> propertyTypes = new HashMap<String, Class>();

        boolean hasReturnableRow = false;

        List returnKeys = getReturnKeys();
        List pkNames = getBusinessObjectMetaDataService().listPrimaryKeyFieldNames(getBusinessObjectClass());
        Person user = GlobalVariables.getUserSession().getPerson();

        // iterate through result list and wrap rows with return url and action urls
        for (Iterator iter = displayList.iterator(); iter.hasNext();) {
            BusinessObject element = (BusinessObject) iter.next();
            if(element instanceof PersistableBusinessObject){
                lookupForm.setLookupObjectId(((PersistableBusinessObject)element).getObjectId());
            }

            BusinessObjectRestrictions businessObjectRestrictions = getBusinessObjectAuthorizationService().getLookupResultRestrictions(element, user);

            HtmlData returnUrl = getReturnUrl(element, lookupForm, returnKeys, businessObjectRestrictions);

            String actionUrls = getActionUrls(element, pkNames, businessObjectRestrictions);
            //Fix for JIRA - KFSMI-2417
            if("".equals(actionUrls)){
                actionUrls = ACTION_URLS_EMPTY;
            }

            List<Column> columns = getColumns();
            for (Object element2 : columns) {

                Column col = (Column) element2;
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation631
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation547
            criteria.addEqualTo(propertyName, parseDate( ObjectUtils.clean(propertyValue) ) );
        }
    }

    private BigDecimal cleanNumeric( String value ) {
        String cleanedValue = value.replaceAll( "[^-0-9.]", "" );
        // ensure only one "minus" at the beginning, if any
        if ( cleanedValue.lastIndexOf( '-' ) > 0 ) {
            if ( cleanedValue.charAt( 0 ) == '-' ) {
                cleanedValue = "-" + cleanedValue.replaceAll( "-", "" );
            } else {
                cleanedValue = cleanedValue.replaceAll( "-", "" );
            }
        }
        // ensure only one decimal in the string
        int decimalLoc = cleanedValue.lastIndexOf( '.' );
        if ( cleanedValue.indexOf( '.' ) != decimalLoc ) {
            cleanedValue = cleanedValue.substring( 0, decimalLoc ).replaceAll( "\\.", "" ) + cleanedValue.substring( decimalLoc );
        }
        try {
            return new BigDecimal( cleanedValue );
        } catch ( NumberFormatException ex ) {
            GlobalVariables.getMessageMap().putError(KRADConstants.DOCUMENT_ERRORS, RiceKeyConstants.ERROR_CUSTOM, new String[] { "Invalid Numeric Input: " + value });
            return null;
        }
    }

    /**
     * Adds to the criteria object based on query characters given
     */
    private void addNumericRangeCriteria(String propertyName, String propertyValue, boolean treatWildcardsAndOperatorsAsLiteral, Criteria criteria) {
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation1117
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.javaRice LDAP Connector314
	}

    protected List<PersonDocumentPhone> loadPhones(IdentityManagementPersonDocument identityManagementPersonDocument, String principalId, List<EntityPhone> entityPhones, boolean suppressDisplay ) {
		List<PersonDocumentPhone> docPhones = new ArrayList<PersonDocumentPhone>();
		if(ObjectUtils.isNotNull(entityPhones)){
			for (EntityPhone phone: entityPhones) {
				if(phone.isActive()){
					PersonDocumentPhone docPhone = new PersonDocumentPhone();
                    if (phone.getPhoneType() != null) {
					    docPhone.setPhoneTypeCode(phone.getPhoneType().getCode());
                    }
					//docPhone.setPhoneType(((KimEntityPhoneImpl)phone).getPhoneType());
					docPhone.setEntityTypeCode(phone.getEntityTypeCode());
					//We do not need to check the privacy setting here - The UI should care of it
					docPhone.setPhoneNumber(phone.getPhoneNumberUnmasked());
					docPhone.setCountryCode(phone.getCountryCodeUnmasked());
					docPhone.setExtensionNumber(phone.getExtensionNumberUnmasked());

					docPhone.setActive(phone.isActive());
					docPhone.setDflt(phone.isDefaultValue());
					docPhone.setEntityPhoneId(phone.getId());
					docPhone.setEdit(true);
					docPhones.add(docPhone);
				}
			}
		}
		return docPhones;

	}
FileProjectLine
org/kuali/rice/kew/api/document/Document.javaRice KEW API175
org/kuali/rice/kew/api/document/Document.javaRice KEW API330
        }

        @Override
        public DateTime getDateCreated() {
            return this.dateCreated;
        }

        @Override
        public DateTime getDateLastModified() {
            return this.dateLastModified;
        }

        @Override
        public DateTime getDateApproved() {
            return this.dateApproved;
        }

        @Override
        public DateTime getDateFinalized() {
            return this.dateFinalized;
        }

        @Override
        public String getTitle() {
            return this.title;
        }

        @Override
        public String getApplicationDocumentId() {
            return this.applicationDocumentId;
        }

        @Override
        public String getInitiatorPrincipalId() {
            return this.initiatorPrincipalId;
        }

        @Override
        public String getRoutedByPrincipalId() {
            return this.routedByPrincipalId;
        }

        @Override
        public String getDocumentTypeName() {
            return this.documentTypeName;
        }

        @Override
        public String getDocumentTypeId() {
            return this.documentTypeId;
        }

        @Override
        public String getDocumentHandlerUrl() {
            return this.documentHandlerUrl;
        }

        @Override
        public String getApplicationDocumentStatus() {
            return this.applicationDocumentStatus;
        }

        @Override
        public DateTime getApplicationDocumentStatusDate() {
            return this.applicationDocumentStatusDate;
        }

        @Override
        public Map<String, String> getVariables() {
            return this.variables;
FileProjectLine
org/kuali/rice/kim/api/responsibility/ResponsibilityAction.javaRice KIM API127
org/kuali/rice/kim/api/responsibility/ResponsibilityAction.javaRice KIM API285
            return new ResponsibilityAction(this);
        }

        @Override
        public String getPrincipalId() {
            return this.principalId;
        }

        @Override
        public String getRoleResponsibilityActionId() {
            return this.roleResponsibilityActionId;
        }

        @Override
        public String getParallelRoutingGroupingCode() {
            return this.parallelRoutingGroupingCode;
        }

        @Override
        public String getActionTypeCode() {
            return this.actionTypeCode;
        }

        @Override
        public String getActionPolicyCode() {
            return this.actionPolicyCode;
        }

        @Override
        public Integer getPriorityNumber() {
            return this.priorityNumber;
        }

        @Override
        public String getGroupId() {
            return this.groupId;
        }

        @Override
        public String getMemberRoleId() {
            return this.memberRoleId;
        }

        @Override
        public String getResponsibilityName() {
            return this.responsibilityName;
        }

        @Override
        public String getResponsibilityId() {
            return this.responsibilityId;
        }

        @Override
        public String getResponsibilityNamespaceCode() {
            return this.responsibilityNamespaceCode;
        }

        @Override
        public boolean isForceAction() {
            return this.forceAction;
        }

        @Override
        public Map<String, String> getQualifier() {
            return this.qualifier;
        }

        @Override
        public List<DelegateType.Builder> getDelegates() {
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl950
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl959
                agenda.setFirstItemId(firstItem.getAlwaysId());
            } else {
                deleteAgendaItem(firstItem, agendaItemSelected);
            }
        }
    }

    private void deleteAgendaItem(AgendaItemBo root, String agendaItemIdToDelete) {
        if (deleteAgendaItem(root, AgendaItemChildAccessor.whenTrue, agendaItemIdToDelete) || 
                deleteAgendaItem(root, AgendaItemChildAccessor.whenFalse, agendaItemIdToDelete) || 
                deleteAgendaItem(root, AgendaItemChildAccessor.always, agendaItemIdToDelete)); // TODO: this is confusing, refactor
    }
    
    private boolean deleteAgendaItem(AgendaItemBo agendaItem, AgendaItemChildAccessor childAccessor, String agendaItemIdToDelete) {
        if (agendaItem == null || childAccessor.getChild(agendaItem) == null) return false;
        if (agendaItemIdToDelete.equals(childAccessor.getChild(agendaItem).getId())) {
            // delete the child in such a way that any ALWAYS children don't get lost from the tree
            AgendaItemBo grandchildToKeep = childAccessor.getChild(agendaItem).getAlways();
            childAccessor.setChild(agendaItem, grandchildToKeep);
            return true;
        } else {
            AgendaItemBo child = childAccessor.getChild(agendaItem);
            // recurse
            for (AgendaItemChildAccessor nextChildAccessor : AgendaItemChildAccessor.linkedNodes) {
                if (deleteAgendaItem(child, nextChildAccessor, agendaItemIdToDelete)) return true;
            }
        }
        return false;
    }
FileProjectLine
org/kuali/rice/kew/xml/export/RuleDelegationXmlExporter.javaRice Implementation76
org/kuali/rice/kew/xml/export/RuleXmlExporter.javaRice Implementation208
    private void exportRuleDelegationParentResponsibility(Element parent, RuleDelegation delegation) {
        Element parentResponsibilityElement = renderer.renderElement(parent, PARENT_RESPONSIBILITY);
        RuleResponsibility ruleResponsibility = KEWServiceLocator.getRuleService().findRuleResponsibility(delegation.getResponsibilityId());
        renderer.renderTextElement(parentResponsibilityElement, PARENT_RULE_NAME, ruleResponsibility.getRuleBaseValues().getName());
        if (ruleResponsibility.isUsingWorkflowUser()) {
        	Principal principal = ruleResponsibility.getPrincipal();
        	renderer.renderTextElement(parentResponsibilityElement, PRINCIPAL_NAME, principal.getPrincipalName());
        } else if (ruleResponsibility.isUsingGroup()) {
        	Group group = ruleResponsibility.getGroup();
        	Element groupElement = renderer.renderElement(parentResponsibilityElement, GROUP_NAME);
        	groupElement.setText(group.getName());
        	groupElement.setAttribute(NAMESPACE, group.getNamespaceCode());
        } else if (ruleResponsibility.isUsingRole()) {
        	renderer.renderTextElement(parentResponsibilityElement, ROLE, ruleResponsibility.getRuleResponsibilityName());
        } else {
        	throw new RiceRuntimeException("Encountered a rule responsibility when exporting with an invalid type of '" + ruleResponsibility.getRuleResponsibilityType());
        }
    }

}
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation427
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation390
        String personId = (String)fieldValues.get(PERSON_REVIEWER_PROPERTY_NAME);

        if (org.apache.commons.lang.StringUtils.isEmpty(groupName) && !org.apache.commons.lang.StringUtils.isEmpty(groupNamespace)) {
            String attributeLabel = getDataDictionaryService().getAttributeLabel(getBusinessObjectClass(), GROUP_REVIEWER_NAME_PROPERTY_NAME);
            GlobalVariables.getMessageMap().putError(GROUP_REVIEWER_NAME_PROPERTY_NAME, RiceKeyConstants.ERROR_REQUIRED, attributeLabel);
        }

        if  (!org.apache.commons.lang.StringUtils.isEmpty(groupName) && org.apache.commons.lang.StringUtils.isEmpty(groupNamespace)) {
            String attributeLabel = getDataDictionaryService().getAttributeLabel(getBusinessObjectClass(), GROUP_REVIEWER_NAMESPACE_PROPERTY_NAME);
            GlobalVariables.getMessageMap().putError(GROUP_REVIEWER_NAMESPACE_PROPERTY_NAME, RiceKeyConstants.ERROR_REQUIRED, attributeLabel);
        }

        if  (!org.apache.commons.lang.StringUtils.isEmpty(groupName) && !org.apache.commons.lang.StringUtils.isEmpty(groupNamespace)) {
            Group group = getGroupService().getGroupByName(groupNamespace, groupName);
FileProjectLine
org/kuali/rice/kim/web/struts/action/IdentityManagementGroupDocumentAction.javaRice Implementation204
org/kuali/rice/kim/web/struts/action/IdentityManagementRoleDocumentAction.javaRice Implementation296
        KimDocumentRoleMember newMember = roleDocumentForm.getMember();

        //See if possible to add with just Group Details filled in (not returned from lookup)
        if (StringUtils.isEmpty(newMember.getMemberId())
                && StringUtils.isNotEmpty(newMember.getMemberName())
                && StringUtils.isNotEmpty(newMember.getMemberNamespaceCode())
                && StringUtils.equals(newMember.getMemberTypeCode(), KimConstants.KimGroupMemberTypes.GROUP_MEMBER_TYPE)) {
            Group tempGroup = KimApiServiceLocator.getGroupService().getGroupByName(newMember.getMemberNamespaceCode(), newMember.getMemberName());
            if (tempGroup != null) {
                newMember.setMemberId(tempGroup.getId());
            }
        }

        //See if possible to grab details for Principal
        if (StringUtils.isEmpty(newMember.getMemberId())
                && StringUtils.isNotEmpty(newMember.getMemberName())
                && StringUtils.equals(newMember.getMemberTypeCode(), KimConstants.KimGroupMemberTypes.PRINCIPAL_MEMBER_TYPE)) {
            Principal principal = KimApiServiceLocator.getIdentityService().getPrincipalByPrincipalName(newMember.getMemberName());
            if (principal != null) {
                newMember.setMemberId(principal.getPrincipalId());
            }
        }
        if (checkKimDocumentRoleMember(newMember) &&
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.javaRice Implementation55
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.javaRice Implementation323
    }

    /**
     * 
     * @see org.kuali.rice.krad.service.PersistenceService#allForeignKeyValuesPopulatedForReference(org.kuali.rice.krad.bo.BusinessObject,
     *      java.lang.String)
     */
    public boolean allForeignKeyValuesPopulatedForReference(PersistableBusinessObject bo, String referenceName) {

        boolean allFkeysHaveValues = true;

        // yelp if nulls were passed in
        if (bo == null) {
            throw new IllegalArgumentException("The Class passed in for the BusinessObject argument was null.");
        }
        if (StringUtils.isBlank(referenceName)) {
            throw new IllegalArgumentException("The String passed in for the referenceName argument was null or empty.");
        }

        PropertyDescriptor propertyDescriptor = null;

        // make sure the attribute exists at all, throw exception if not
        try {
            propertyDescriptor = PropertyUtils.getPropertyDescriptor(bo, referenceName);
		} catch (Exception e) {
            throw new RuntimeException(e);
        }
        if (propertyDescriptor == null) {
            throw new ReferenceAttributeDoesntExistException("Requested attribute: '" + referenceName + "' does not exist " + "on class: '" + bo.getClass().getName() + "'.");
        }

        // get the class of the attribute name
        Class referenceClass = getBusinessObjectAttributeClass( bo.getClass(), referenceName );
        if ( referenceClass == null ) {
        	referenceClass = propertyDescriptor.getPropertyType();
        }

        // make sure the class of the attribute descends from BusinessObject,
        // otherwise throw an exception
        if (!PersistableBusinessObject.class.isAssignableFrom(referenceClass)) {
			throw new ObjectNotABusinessObjectRuntimeException("Attribute requested (" + referenceName + ") is of class: " + "'" + referenceClass.getName() + "' and is not a " + "descendent of BusinessObject.  Only descendents of BusinessObject "
					+ "can be used.");
        }
FileProjectLine
org/kuali/rice/kim/impl/permission/PermissionInquirableImpl.javaRice Implementation57
org/kuali/rice/kim/impl/responsibility/ResponsibilityInquirableImpl.javaRice Implementation53
			inquiry.buildInquiryLink(dataObject, propertyName, UberResponsibilityBo.class, primaryKeys);
    	} else if(NAMESPACE_CODE.equals(propertyName) || TEMPLATE_NAMESPACE_CODE.equals(propertyName)){
    		Map<String, String> primaryKeys = new HashMap<String, String>();
			primaryKeys.put(propertyName, "code");
			inquiry.buildInquiryLink(dataObject, propertyName, NamespaceBo.class, primaryKeys);
        } else if(DETAIL_OBJECTS.equals(propertyName)){
        	//return getAttributesInquiryUrl(businessObject, DETAIL_OBJECTS);
        	super.buildInquirableLink(dataObject, propertyName, inquiry);
        } else if(ASSIGNED_TO_ROLES.equals(propertyName)){
//        	return getAssignedRoleInquiryUrl(dataObject);
        	super.buildInquirableLink(dataObject, propertyName, inquiry);
        }else{
        	super.buildInquirableLink(dataObject, propertyName, inquiry);
        }
	}

    @Override
    public HtmlData getInquiryUrl(BusinessObject businessObject, String attributeName, boolean forceInquiry) {
    	/*
    	 *  - responsibility detail values (attribute name and value separated by colon, commas between attributes)
		 *	- required role qualifiers (attribute name and value separated by colon, commas between attributes)
		 *	- list of roles assigned: role type, role namespace, role name
    	 */
    	if(NAME.equals(attributeName) || NAME_TO_DISPLAY.equals(attributeName)){
			List<String> primaryKeys = new ArrayList<String>();
			primaryKeys.add(RESPONSIBILITY_ID);
FileProjectLine
org/kuali/rice/kim/api/identity/address/EntityAddress.javaRice KIM API207
org/kuali/rice/kim/api/identity/address/EntityAddress.javaRice KIM API405
        }

        @Override
        public String getLine1Unmasked() {
            return this.line1Unmasked;
        }

        @Override
        public String getLine2Unmasked() {
            return this.line2Unmasked;
        }

        @Override
        public String getLine3Unmasked() {
            return this.line3Unmasked;
        }

        @Override
        public String getCityUnmasked() {
            return this.cityUnmasked;
        }

        @Override
        public String getStateCodeUnmasked() {
            return this.stateCodeUnmasked;
        }

        @Override
        public String getPostalCodeUnmasked() {
            return this.postalCodeUnmasked;
        }

        @Override
        public String getCountryCodeUnmasked() {
            return this.countryCodeUnmasked;
        }

        @Override
        public boolean isSuppressAddress() {
            return this.suppressAddress;
        }

        @Override
        public boolean isDefaultValue() {
            return this.defaultValue;
        }

        @Override
        public Long getVersionNumber() {
            return this.versionNumber;
        }

        @Override
        public String getObjectId() {
            return this.objectId;
        }

        @Override
        public boolean isActive() {
            return this.active;
        }

        @Override
        public String getId() {
            return this.id;
        }

        public void setEntityId(String entityId) {
FileProjectLine
edu/sampleu/travel/krad/form/UILayoutTestForm.javaRice Sample App208
edu/sampleu/travel/krad/form/UITestForm.javaRice Sample App88
		super();
	}

	@Override
	public void postBind(HttpServletRequest request) {
		super.postBind(request);
	}

	public String getField1() {
		return this.field1;
	}

	public void setField1(String field1) {
		this.field1 = field1;
	}

	public String getField2() {
		return this.field2;
	}

	public void setField2(String field2) {
		this.field2 = field2;
	}

	public String getField3() {
		return this.field3;
	}

	public void setField3(String field3) {
		this.field3 = field3;
	}

	public String getField4() {
		return this.field4;
	}

	public void setField4(String field4) {
		this.field4 = field4;
	}

	public String getField5() {
		return this.field5;
	}

	public void setField5(String field5) {
		this.field5 = field5;
	}

	public String getField6() {
		return this.field6;
	}

	public void setField6(String field6) {
		this.field6 = field6;
	}

	public int getField7() {
FileProjectLine
org/kuali/rice/kns/web/struts/form/LookupForm.javaRice KNS246
org/kuali/rice/kns/web/struts/form/LookupForm.javaRice KNS276
                for (Iterator iter = localLookupable.getRows().iterator(); iter.hasNext();) {
                    Row row = (Row) iter.next();

                    for (Iterator iterator = row.getFields().iterator(); iterator.hasNext();) {
                        Field field = (Field) iterator.next();

                        // check whether form already has value for field
                        if (formFields != null && formFields.containsKey(field.getPropertyName())) {
                            field.setPropertyValue(formFields.get(field.getPropertyName()));
                        }

                        // override values with request
                        if (getParameter(request, field.getPropertyName()) != null) {
                        	if(!Field.MULTI_VALUE_FIELD_TYPES.contains(field.getFieldType())) {
                        		field.setPropertyValue(getParameter(request, field.getPropertyName()).trim());
                        	} else {
                        		//multi value, set to values
                        		field.setPropertyValues(getParameterValues(request, field.getPropertyName()));
                        	}
                        }
FileProjectLine
edu/sampleu/travel/krad/controller/UIComponentsTestController.javaRice Sample App41
edu/sampleu/travel/krad/controller/UILayoutTestController.javaRice Sample App39
public class UILayoutTestController extends UifControllerBase {

	@Override
    protected UILayoutTestForm createInitialForm(HttpServletRequest request) {
        return new UILayoutTestForm();
    }

	@Override
	@RequestMapping(params = "methodToCall=start")
	public ModelAndView start(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
			HttpServletRequest request, HttpServletResponse response) {
	    UILayoutTestForm uiTestForm = (UILayoutTestForm) form;

		return super.start(uiTestForm, result, request, response);
	}

	@RequestMapping(method = RequestMethod.POST, params = "methodToCall=save")
	public ModelAndView save(@ModelAttribute("KualiForm") UILayoutTestForm uiTestForm, BindingResult result,
			HttpServletRequest request, HttpServletResponse response) {

		return getUIFModelAndView(uiTestForm, uiTestForm.getViewId(), "page2");
	}
	
	@RequestMapping(method = RequestMethod.POST, params = "methodToCall=close")
	public ModelAndView close(@ModelAttribute("KualiForm") UILayoutTestForm uiTestForm, BindingResult result,
			HttpServletRequest request, HttpServletResponse response) {

		return getUIFModelAndView(uiTestForm, uiTestForm.getViewId(), "page1");
	}
FileProjectLine
org/kuali/rice/kim/api/permission/Permission.javaRice KIM API124
org/kuali/rice/kim/api/responsibility/Responsibility.javaRice KIM API123
        this.attributes = builder.getAttributes() != null ? builder.getAttributes() : Collections.<String, String>emptyMap();
        this.active = builder.isActive();
        this.versionNumber = builder.getVersionNumber();
        this.objectId = builder.getObjectId();
	}

	/**
	 * @see ResponsibilityContract#getId()
	 */
	@Override
	public String getId() {
		return id;
	}

	/**
	 * @see ResponsibilityContract#getNamespaceCode()
	 */
	@Override
	public String getNamespaceCode() {
		return namespaceCode;
	}

	/**
	 * @see ResponsibilityContract#getName()
	 */
	@Override
	public String getName() {
		return name;
	}

	/**
	 * @see ResponsibilityContract#getDescription()
	 */
	@Override
	public String getDescription() {
		return description;
	}

	/**
	 * @see ResponsibilityContract#getTemplate()
	 */
	@Override
	public Template getTemplate() {
		return template;
	}

	/**
	 * @see org.kuali.rice.core.api.mo.common.active.Inactivatable#isActive()
	 */
	@Override
	public boolean isActive() {
		return active;
	}

	/**
	 *
	 * @see ResponsibilityContract#getAttributes()
	 */
	@Override
	public Map<String, String> getAttributes() {
		return this.attributes;
	}

	/**
	 * @see org.kuali.rice.core.api.mo.common.Versioned#getVersionNumber()
	 */
	@Override
	public Long getVersionNumber() {
		return versionNumber;
	}

	/**
	 * @see org.kuali.rice.core.api.mo.common.GloballyUnique#getObjectId()
	 */
	@Override
	public String getObjectId() {
		return objectId;
	}

    /**
     * This builder constructs a Responsibility enforcing the constraints of the {@link ResponsibilityContract}.
     */
    public static final class Builder implements ResponsibilityContract, ModelBuilder, Serializable {
FileProjectLine
org/kuali/rice/kew/rule/service/impl/RuleDelegationServiceImpl.javaRice Implementation95
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.javaRice Implementation669
            Boolean workgroupMember, Boolean delegateRule, Boolean activeInd, Map extensionValues, Collection<String> actionRequestCodes) {

        if ( (StringUtils.isEmpty(docTypeName)) &&
                (StringUtils.isEmpty(ruleTemplateName)) &&
                (StringUtils.isEmpty(ruleDescription)) &&
                (StringUtils.isEmpty(groupId)) &&
                (StringUtils.isEmpty(principalId)) &&
                (extensionValues.isEmpty()) &&
                (actionRequestCodes.isEmpty()) ) {
            // all fields are empty
            throw new IllegalArgumentException("At least one criterion must be sent");
        }

        RuleTemplate ruleTemplate = getRuleTemplateService().findByRuleTemplateName(ruleTemplateName);
        String ruleTemplateId = null;
        if (ruleTemplate != null) {
            ruleTemplateId = ruleTemplate.getRuleTemplateId();
        }

        if ( ( (extensionValues != null) && (!extensionValues.isEmpty()) ) &&
                (ruleTemplateId == null) ) {
            // cannot have extensions without a correct template
            throw new IllegalArgumentException("A Rule Template Name must be given if using Rule Extension values");
        }

        Collection<String> workgroupIds = new ArrayList<String>();
        if (principalId != null) {
FileProjectLine
org/kuali/rice/kns/service/impl/SessionDocumentServiceImpl.javaRice Implementation50
org/kuali/rice/krad/service/impl/SessionDocumentServiceImpl.javaRice Implementation52
@Transactional
public class SessionDocumentServiceImpl implements SessionDocumentService, InitializingBean {
    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(SessionDocumentServiceImpl.class);

    protected static final String IP_ADDRESS = "ipAddress";
    protected static final String PRINCIPAL_ID = "principalId";
    protected static final String DOCUMENT_NUMBER = "documentNumber";
    protected static final String SESSION_ID = "sessionId";

    private Map<String, CachedObject> cachedObjects;
    private EncryptionService encryptionService;
    private int maxCacheSize;

    private BusinessObjectService businessObjectService;
    private DataDictionaryService dataDictionaryService;
    private SessionDocumentDao sessionDocumentDao;

    public static class CachedObject {
        private UserSession userSession;
        private String formKey;

        CachedObject(UserSession userSession, String formKey) {
            this.userSession = userSession;
            this.formKey = formKey;
        }

        @Override
        public String toString() {
            return "CachedObject: principalId=" + userSession.getPrincipalId() + " / objectWithFormKey=" +
                    userSession.retrieveObject(formKey);
        }

        public UserSession getUserSession() {
            return this.userSession;
        }

        public String getFormKey() {
            return this.formKey;
        }
    }

    @Override
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl676
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl727
            agenda.setFirstItemId(bogusRootNode.getWhenFalseId());
        }
    }

    private boolean isSiblings(AgendaItemBo cousin1, AgendaItemBo cousin2) {
        if (cousin1.equals(cousin2)) return true; // this is a bit abusive
        
        // can you walk to c1 from ALWAYS links of c2?
        AgendaItemBo candidate = cousin2;
        while (null != (candidate = candidate.getAlways())) {
            if (candidate.equals(cousin1)) return true;
        }
        // can you walk to c2 from ALWAYS links of c1?
        candidate = cousin1;
        while (null != (candidate = candidate.getAlways())) {
            if (candidate.equals(cousin2)) return true;
        }
        return false;
    }

    /**
     * This method returns the level order accessor (getWhenTrue or getWhenFalse) that relates the parent directly 
     * to the child.  If the two nodes don't have such a relationship, null is returned. 
     * Note that this only finds accessors for oldest children, not younger siblings.
     */
    private AgendaItemChildAccessor getOldestChildAccessor(
            AgendaItemBo child, AgendaItemBo parent) {
        AgendaItemChildAccessor levelOrderChildAccessor = null;
        
        if (parent != null) {
            for (AgendaItemChildAccessor childAccessor : AgendaItemChildAccessor.children) {
                if (child.equals(childAccessor.getChild(parent))) {
                    levelOrderChildAccessor = childAccessor;
                    break;
                }
            }
        }
        return levelOrderChildAccessor;
    }
    
    /**
     * This method finds and returns the first agenda item in the agenda, or null if there are no items presently
     * 
     * @param agenda
     * @return
     */
    private AgendaItemBo getFirstAgendaItem(AgendaBo agenda) {
        AgendaItemBo firstItem = null;
FileProjectLine
org/kuali/rice/kew/routeheader/dao/impl/DocumentRouteHeaderDAOOjbImpl.javaRice Implementation227
org/kuali/rice/kew/routeheader/dao/impl/DocumentRouteHeaderDAOOjbImpl.javaRice Implementation299
            }
        } catch (SQLException sqle) {
            LOG.error("SQLException: " + sqle.getMessage(), sqle);
            throw new WorkflowRuntimeException(sqle);
        } catch (LookupException le) {
            LOG.error("LookupException: " + le.getMessage(), le);
            throw new WorkflowRuntimeException(le);
        } finally {
        	if (rs != null) {
                try {
                    rs.close();
                } catch (SQLException e) {
                    LOG.warn("Could not close result set.");
                }
            }
            if (statement != null) {
                try {
                    statement.close();
                } catch (SQLException e) {
                    LOG.warn("Could not close statement.");
                }
            }
            try {
                if (broker != null) {
                    OjbFactoryUtils.releasePersistenceBroker(broker, this.getPersistenceBrokerTemplate().getPbKey());
                }
            } catch (Exception e) {
                LOG.error("Failed closing connection: " + e.getMessage(), e);
            }
        }
        return applicationId;
FileProjectLine
org/kuali/rice/kew/stats/dao/impl/StatsDAOOjbImpl.javaRice Implementation95
org/kuali/rice/kew/stats/dao/impl/StatsDaoJpaImpl.javaRice Implementation67
            String number = result[0].toString();
            if (actionType.equals(KEWConstants.ROUTE_HEADER_CANCEL_CD)) {
                stats.setCanceledNumber(number);
            } else if (actionType.equals(KEWConstants.ROUTE_HEADER_DISAPPROVED_CD)) {
                stats.setDisapprovedNumber(number);
            } else if (actionType.equals(KEWConstants.ROUTE_HEADER_ENROUTE_CD)) {
                stats.setEnrouteNumber(number);
            } else if (actionType.equals(KEWConstants.ROUTE_HEADER_EXCEPTION_CD)) {
                stats.setExceptionNumber(number);
            } else if (actionType.equals(KEWConstants.ROUTE_HEADER_FINAL_CD)) {
                stats.setFinalNumber(number);
            } else if (actionType.equals(KEWConstants.ROUTE_HEADER_INITIATED_CD)) {
                stats.setInitiatedNumber(number);
            } else if (actionType.equals(KEWConstants.ROUTE_HEADER_PROCESSED_CD)) {
                stats.setProcessedNumber(number);
            } else if (actionType.equals(KEWConstants.ROUTE_HEADER_SAVED_CD)) {
                stats.setSavedNumber(number);
            }
        }
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation471
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.javaRice Implementation281
            displayList = (List<GroupBo>)getSearchResultsUnbounded(lookupForm.getFieldsForLookup());
        }

        HashMap<String,Class> propertyTypes = new HashMap<String, Class>();

        boolean hasReturnableRow = false;

        List returnKeys = getReturnKeys();
        List pkNames = getBusinessObjectMetaDataService().listPrimaryKeyFieldNames(getBusinessObjectClass());
        Person user = GlobalVariables.getUserSession().getPerson();

        // iterate through result list and wrap rows with return url and action urls
        for (Iterator iter = displayList.iterator(); iter.hasNext();) {
            BusinessObject element = (BusinessObject) iter.next();
            if(element instanceof PersistableBusinessObject){
                lookupForm.setLookupObjectId(((PersistableBusinessObject)element).getObjectId());
            }

            BusinessObjectRestrictions businessObjectRestrictions = getBusinessObjectAuthorizationService().getLookupResultRestrictions(element, user);

            HtmlData returnUrl = getReturnUrl(element, lookupForm, returnKeys, businessObjectRestrictions);

            String actionUrls = getActionUrls(element, pkNames, businessObjectRestrictions);
            //Fix for JIRA - KFSMI-2417
            if("".equals(actionUrls)){
                actionUrls = ACTION_URLS_EMPTY;
            }
FileProjectLine
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.javaRice Implementation309
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.javaRice Implementation333
                Criteria userCrit = new Criteria(objectsToRetrieve.getName());
                Criteria groupCrit = new Criteria(objectsToRetrieve.getName());
                Criteria orCrit = new Criteria(objectsToRetrieve.getName());
                userCrit.eq("delegatorPrincipalId", principalId);
                List<String> userGroupIds = new ArrayList<String>();
                for(String id: KimApiServiceLocator.getGroupService().getGroupIdsForPrincipal(principalId)){
                	userGroupIds.add(id);
                }
                if (!userGroupIds.isEmpty()) {
                	groupCrit.in("delegatorGroupId", userGroupIds);
                }
                orCrit.or(userCrit);
                orCrit.or(groupCrit);
                crit.and(orCrit);
                crit.eq("delegationType", DelegationType.PRIMARY.getCode());
                filter.setDelegationType(DelegationType.PRIMARY.getCode());
                filter.setExcludeDelegationType(false);
                addToFilterDescription(filteredByItems, "Primary Delegator Id");
                addedDelegationCriteria = true;
                filterOn = true;
            }
FileProjectLine
org/kuali/rice/core/api/criteria/InPredicate.javaRice Core API87
org/kuali/rice/core/api/criteria/NotInPredicate.javaRice Core API87
    NotInPredicate(String propertyPath, Set<? extends CriteriaValue<?>> values) {
    	if (StringUtils.isBlank(propertyPath)) {
			throw new IllegalArgumentException("Property path cannot be null or blank.");
		}
    	CriteriaSupportUtils.validateValuesForMultiValuedPredicate(values);
		this.propertyPath = propertyPath;

        if (values == null) {
            this.values = Collections.emptySet();
        } else {
            final Set<CriteriaValue<?>> temp = new HashSet<CriteriaValue<?>>();
            for (CriteriaValue<?> value: values) {
                if (value != null) {
                    temp.add(value);
                }
            }
            this.values = Collections.unmodifiableSet(temp);
        }
    }

    @Override
    public String getPropertyPath() {
    	return propertyPath;
    }
    
    @Override
    public Set<CriteriaValue<?>> getValues() {
    	return Collections.unmodifiableSet(values);
    }
        
	/**
     * Defines some internal constants used on this class.
     */
    static class Constants {
        final static String ROOT_ELEMENT_NAME = "notIn";
FileProjectLine
org/kuali/rice/krad/bo/JpaToDdl.javaRice Implementation158
org/kuali/rice/krad/bo/JpaToOjbMetadata.javaRice Implementation185
					sb.append( "		<collection-descriptor name=\"" );
					sb.append( field.getName() );
					sb.append( "\" element-class-ref=\"" );
					sb.append( oneToMany.targetEntity().getName() );
					sb.append( "\" collection-class=\"org.apache.ojb.broker.util.collections.ManageableArrayList\" auto-retrieve=\"true\" auto-update=\"object\" auto-delete=\"object\" proxy=\"true\">\r\n" );
					for ( JoinColumn col : keys ) {
						sb.append( "			<inverse-foreignkey field-ref=\"" );
						sb.append( getPropertyFromField( clazz, col.name() ) );
						sb.append( "\" />\r\n" );
					}
					sb.append( "		</collection-descriptor>\r\n" );
				}
			}
		}
	}
	
	private static String getPropertyFromField( Class<? extends Object> clazz, String colName ) {
		for ( Field field : clazz.getDeclaredFields() ) {
			Column column = (Column)field.getAnnotation( Column.class );
			if ( column != null ) {
				if ( column.name().equals( colName ) ) {
					return field.getName();
				}
			}
		}
		return "";
	}
}
FileProjectLine
org/kuali/rice/krad/util/OjbCollectionHelper.javaRice Implementation39
org/kuali/rice/krad/util/OjbCollectionHelper.javaRice Implementation80
    public void processCollections2(OjbCollectionAware template, PersistableBusinessObject orig, PersistableBusinessObject copy) {
        // if copy is null this is the first time we are saving the object, don't have to worry about updating collections
        if (copy == null) {
            return;
        }
        
        List<Collection<PersistableBusinessObject>> originalCollections = orig.buildListOfDeletionAwareLists();

        if (originalCollections != null && !originalCollections.isEmpty()) {
            /*
             * Prior to being saved, the version in the database will not yet reflect any deleted collections. So, a freshly
             * retrieved version will contain objects that need to be removed:
             */
            try {
                List<Collection<PersistableBusinessObject>> copyCollections = copy.buildListOfDeletionAwareLists();
                int size = originalCollections.size();

                if (copyCollections.size() != size) {
                    throw new RuntimeException("size mismatch while attempting to process list of Collections to manage");
                }

                for (int i = 0; i < size; i++) {
                    Collection<PersistableBusinessObject> origSource = originalCollections.get(i);
                    Collection<PersistableBusinessObject> copySource = copyCollections.get(i);
                    List<PersistableBusinessObject> list = findUnwantedElements(copySource, origSource);
                    cleanse(template, origSource, list);
                }
            }
            catch (ObjectRetrievalFailureException orfe) {
                // object wasn't found, must be pre-save
            }
        }
    }
FileProjectLine
org/kuali/rice/kew/stats/web/StatsForm.javaRice Implementation41
edu/sampleu/kew/krad/form/StatsForm.javaRice Sample App38
public class StatsForm extends UifFormBase {

    private static final long serialVersionUID = 4587377779133823858L;
    private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(StatsForm.class);
    private static final String BEGIN_DATE = "begDate";
    private static final String END_DATE = "endDate";

    public static final String DAY_TIME_UNIT = "DDD";
    public static final String WEEK_TIME_UNIT = "WW";
    public static final String MONTH_TIME_UNIT = "MM";
    public static final String YEAR_TIME_UNIT = "YYYY";

    public static final String DEFAULT_BEGIN_DATE = "01/01/1900";
    public static final String DEFAULT_END_DATE = "01/01/2400";
    public static final String BEG_DAY_TIME = " 00:00";
    public static final String END_DAY_TIME = " 23:59";
    public static final String DATE_FORMAT = "MM/dd/yyyy";
    public static final String TIME_FORMAT = " HH:mm";

    private Stats stats;
    private String methodToCall = "";
    private String avgActionsPerTimeUnit = DAY_TIME_UNIT;

    private String begDate;
    private String endDate;

    private Date beginningDate;
    private Date endingDate;

    // KULRICE-3137: Added a backLocation parameter similar to the one from lookups.
    private String backLocation;

    public StatsForm() {
        stats = new Stats();
    }
FileProjectLine
org/kuali/rice/ken/web/spring/UserPreferencesController.javaRice Implementation145
org/kuali/rice/ken/web/spring/UserPreferencesController.javaRice Implementation188
       LOG.debug("Finished unsubscribe service: "+newChannel.getName());
       
       // get current subscription channel ids
       Collection<UserChannelSubscription> subscriptions = this.userPreferenceService.getCurrentSubscriptions(userid);
       Map<String, Object> currentsubs = new HashMap<String, Object>();
       Iterator<UserChannelSubscription> i = subscriptions.iterator();
       while (i.hasNext()) {
 	  UserChannelSubscription sub = i.next();
 	  String subid = Long.toString(sub.getChannel().getId());
	  currentsubs.put(subid, subid);
 	  LOG.debug("currently subscribed to: "+sub.getChannel().getId());
       }
       
       // get all subscribable channels       
       Collection<NotificationChannel> channels = this.notificationChannelService.getSubscribableChannels();
       
       Map<String, Object> model = new HashMap<String, Object>();
       model.put("channels", channels);
       model.put("currentsubs", currentsubs);
       return new ModelAndView(view, model);    
        
   }
FileProjectLine
org/kuali/rice/core/api/uif/RemotableCheckboxGroup.javaRice Core API45
org/kuali/rice/core/api/uif/RemotableRadioButtonGroup.javaRice Core API45
    private RemotableRadioButtonGroup(Builder b) {
        keyLabels = b.keyLabels;
    }

    @Override
    public Map<String, String> getKeyLabels() {
        return keyLabels;
    }

    public static final class Builder extends RemotableAbstractControl.Builder implements KeyLabeled {
        private Map<String, String> keyLabels;

        private Builder(Map<String, String> keyLabels) {
            setKeyLabels(keyLabels);
        }

        public static Builder create(Map<String, String> keyLabels) {
            return new Builder(keyLabels);
        }

        @Override
        public Map<String, String> getKeyLabels() {
            return keyLabels;
        }

        public void setKeyLabels(Map<String, String> keyLabels) {
            if (keyLabels == null || keyLabels.isEmpty()) {
                throw new IllegalArgumentException("keyLabels must be non-null & non-empty");
            }

            this.keyLabels = Collections.unmodifiableMap(new HashMap<String, String>(keyLabels));
        }

        @Override
        public RemotableRadioButtonGroup build() {
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation523
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.javaRice Implementation329
                if ( propClass == null /*&& !skipPropTypeCheck*/) {
                    try {
                        propClass = ObjectUtils.getPropertyType( element, col.getPropertyName(), getPersistenceStructureService() );
                        propertyTypes.put( col.getPropertyName(), propClass );
                    } catch (Exception e) {
                        throw new RuntimeException("Cannot access PropertyType for property " + "'" + col.getPropertyName() + "' " + " on an instance of '" + element.getClass().getName() + "'.", e);
                    }
                }

                // formatters
                if (prop != null) {
                    // for Booleans, always use BooleanFormatter
                    if (prop instanceof Boolean) {
                        formatter = new BooleanFormatter();
                    }

                    // for Dates, always use DateFormatter
                    if (prop instanceof Date) {
                        formatter = new DateFormatter();
                    }

                    // for collection, use the list formatter if a formatter hasn't been defined yet
                    if (prop instanceof Collection && formatter == null) {
                    formatter = new CollectionFormatter();
                    }

                    if (formatter != null) {
                        propValue = (String) formatter.format(prop);
                    }
                    else {
                        propValue = prop.toString();
FileProjectLine
org/kuali/rice/shareddata/api/county/County.javaRice Shared Data API167
org/kuali/rice/shareddata/api/state/State.javaRice Shared Data API159
            final Builder builder = new Builder(contract.getCode(), contract.getName(), contract.getCountryCode());
            builder.setActive(contract.isActive());
            builder.setVersionNumber(contract.getVersionNumber());
            return builder;
        }

        @Override
        public String getCode() {
            return code;
        }

        /**
         * Sets the code to be used for the State created from this Builder.
         * @param code String code for a State.
         * @throws IllegalArgumentException if the passed in code is null or a blank String.
         */
        public void setCode(String code) {
            if (StringUtils.isBlank(code)) {
                throw new IllegalArgumentException("code is blank");
            }

            this.code = code;
        }

        @Override
        public String getName() {
            return name;
        }

        /**
         * Sets the full name of the State created from this Builder.
         * @param name String representing the full name for the State
         * @throws IllegalArgumentException if the passed in name is null or a blank String.
         */
        public void setName(String name) {
            if (StringUtils.isBlank(name)) {
                throw new IllegalArgumentException("name is blank");
            }

            this.name = name;
        }

        @Override
        public String getCountryCode() {
            return countryCode;
        }

        /**
         * Sets the Country code to be associated with the State created from this Builder.
         * @param countryCode String representing the Country Code
         * @throws IllegalArgumentException if the passed in countryCode is null or a blank String.
         */
        public void setCountryCode(String countryCode) {
            if (StringUtils.isBlank(countryCode)) {
                throw new IllegalArgumentException("countryCode is blank");
            }

            this.countryCode = countryCode;
        }

        @Override
        public boolean isActive() {
FileProjectLine
org/kuali/rice/krad/bo/authorization/BusinessObjectAuthorizerBase.javaRice KRAD Web Framework161
org/kuali/rice/krad/uif/authorization/AuthorizerBase.javaRice KRAD Web Framework168
            permissionDetails = new HashMap<String, String>(getPermissionDetailValues(dataObject));
        }

        return getPermissionService().isAuthorized(principalId, namespaceCode, permissionName,
                permissionDetails, roleQualifiers);
    }

    public final boolean isAuthorizedByTemplate(Object dataObject, String namespaceCode, String permissionTemplateName,
            String principalId, Map<String, String> collectionOrFieldLevelPermissionDetails,
            Map<String, String> collectionOrFieldLevelRoleQualification) {
        Map<String, String> roleQualifiers = new HashMap<String, String>(getRoleQualification(dataObject, principalId));
        Map<String, String> permissionDetails = new HashMap<String, String>(getPermissionDetailValues(dataObject));

        if (collectionOrFieldLevelRoleQualification != null) {
            roleQualifiers.putAll(collectionOrFieldLevelRoleQualification);
        }
        if (collectionOrFieldLevelPermissionDetails != null) {
            permissionDetails.putAll(collectionOrFieldLevelPermissionDetails);
        }

        return getPermissionService().isAuthorizedByTemplateName(principalId, namespaceCode,
                permissionTemplateName, permissionDetails, roleQualifiers);
    }

    /**
     * Returns a role qualification map based off data from the primary business
     * object or the document. DO NOT MODIFY THE MAP RETURNED BY THIS METHOD
     * 
     * @param primaryDataObjectOrDocument
     *            the primary data object (i.e. the main object instance behind
     *            the lookup result row or inquiry) or the document
     * @return a Map containing role qualifications
     */
    protected final Map<String, String> getRoleQualification(Object primaryDataObjectOrDocument) {
FileProjectLine
org/kuali/rice/kew/api/rule/RuleReportCriteria.javaRice KEW API101
org/kuali/rice/kew/api/rule/RuleReportCriteria.javaRice KEW API209
            return new RuleReportCriteria(this);
        }

        @Override
        public String getRuleDescription() {
            return this.ruleDescription;
        }

        @Override
        public String getDocumentTypeName() {
            return this.documentTypeName;
        }

        @Override
        public String getRuleTemplateName() {
            return this.ruleTemplateName;
        }

        @Override
        public List<String> getActionRequestCodes() {
            return this.actionRequestCodes;
        }

        @Override
        public String getResponsiblePrincipalId() {
            return this.responsiblePrincipalId;
        }

        @Override
        public String getResponsibleGroupId() {
            return this.responsibleGroupId;
        }

        @Override
        public String getResponsibleRoleName() {
            return this.responsibleRoleName;
        }

        @Override
        public Map<String, String> getRuleExtensions() {
            return this.ruleExtensions;
        }

        @Override
        public boolean isActive() {
            return this.active;
        }

        @Override
        public boolean isConsiderGroupMembership() {
            return this.considerGroupMembership;
        }

        @Override
        public boolean isIncludeDelegations() {
            return this.includeDelegations;
        }

        public void setRuleDescription(String ruleDescription) {
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceStructureServiceJpaImpl.javaRice Implementation595
org/kuali/rice/krad/service/impl/PersistenceStructureServiceOjbImpl.javaRice Implementation636
			references.put(collectionDescriptor.getAttributeName(), collectionDescriptor.getItemClass());
		}
		
		return references;
	}

	public Map<String, Class> listCollectionObjectTypes(PersistableBusinessObject bo) {
		// validate parameter
		if (bo == null) {
			throw new IllegalArgumentException("BO specified in the parameter was null.");
		}
		if (!(bo instanceof PersistableBusinessObject)) {
			throw new IllegalArgumentException("BO specified [" + bo.getClass().getName() + "] must be a class that " + "inherits from BusinessObject.");
		}

		return listCollectionObjectTypes(bo.getClass());
	}

	/**
	 * @see org.kuali.rice.krad.service.PersistenceStructureService#listReferenceObjectFieldNames(org.kuali.rice.krad.bo.BusinessObject)
	 */
	public Map<String, Class> listReferenceObjectFields(PersistableBusinessObject bo) {
		// validate parameter
		if (bo == null) {
			throw new IllegalArgumentException("BO specified in the parameter was null.");
		}
		if (!(bo instanceof PersistableBusinessObject)) {
			throw new IllegalArgumentException("BO specified [" + bo.getClass().getName() + "] must be a class that " + "inherits from BusinessObject.");
		}

		return listReferenceObjectFields(bo.getClass());
	}

	
	public boolean isReferenceUpdatable(Class boClass, String referenceName) {
FileProjectLine
edu/sampleu/bookstore/document/web/BookOrderAction.javaRice Sample App29
edu/sampleu/bookstore/document/web/BookOrderAction.javaRice Sample App67
        BookOrderDocument document = form.getBookOrderDocument();
        for (BookOrder entry : document.getBookOrders()) {
        	if(entry.getBookId() != null){
        	Book book = KRADServiceLocator.getBusinessObjectService().findBySinglePrimaryKey(Book.class, entry.getBookId());
        	entry.setUnitPrice(book.getPrice());
			Double totalPrice = 0.0d;
			if (book.getPrice() != null && entry.getQuantity() != null) {
				totalPrice = book.getPrice().doubleValue() * entry.getQuantity().intValue();
				if (entry.getDiscount() != null && entry.getDiscount().doubleValue() > 0) {
					totalPrice = totalPrice	- (totalPrice * entry.getDiscount().doubleValue() / 100);
				}
			}
			entry.setTotalPrice(new KualiDecimal(totalPrice));
FileProjectLine
org/kuali/rice/kew/engine/node/KRAMetaRuleNode.javaRice Implementation185
org/kuali/rice/kew/engine/node/RequestsNode.javaRice Implementation208
	protected void isPastFinalApprover(List previousNodeInstances, FinalApproverContext context,
			Set revokedNodeInstanceIds) {
		if ( previousNodeInstances != null && !previousNodeInstances.isEmpty() ) {
			for ( Iterator iterator = previousNodeInstances.iterator(); iterator.hasNext(); ) {
				if ( context.isPast ) {
					return;
				}
				RouteNodeInstance nodeInstance = (RouteNodeInstance)iterator.next();
				if ( context.inspected.contains( getKey( nodeInstance ) ) ) {
					continue;
				} else {
					context.inspected.add( getKey( nodeInstance ) );
				}
				if ( Boolean.TRUE.equals( nodeInstance.getRouteNode().getFinalApprovalInd() ) ) {
					// if the node instance has been revoked (by a Return To
					// Previous action for example)
					// then we don't want to consider that node when we
					// determine if we are past final
					// approval or not
					if ( !revokedNodeInstanceIds.contains( nodeInstance.getRouteNodeInstanceId() ) ) {
						context.isPast = true;
					}
					return;
				}
				isPastFinalApprover( nodeInstance.getPreviousNodeInstances(), context,
						revokedNodeInstanceIds );
			}
		}
	}
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToOneDescriptor.javaRice Core Framework38
org/kuali/rice/core/framework/persistence/jpa/metadata/OneToOneDescriptor.javaRice Core Framework53
		if (!joinColumnDescriptors.isEmpty()) {
			sb.append(", join columns = { ");
			for (JoinColumnDescriptor joinColumnDescriptor : joinColumnDescriptors) {				
				sb.append(" jc = { ");
				sb.append("name:").append(joinColumnDescriptor.getName()).append(", ");
				sb.append("insertable:").append(joinColumnDescriptor.isInsertable()).append(", ");
				sb.append("nullable:").append(joinColumnDescriptor.isNullable()).append(", ");
				sb.append("unique:").append(joinColumnDescriptor.isUnique()).append(", ");
				sb.append("updateable:").append(joinColumnDescriptor.isUpdateable());
				sb.append(" }");
			}
			sb.append(" } ");
		}
		sb.append(" ]");
		return sb.toString();
	}
	
}
FileProjectLine
org/kuali/rice/kim/bo/ui/KimDocumentRoleResponsibilityAction.javaRice Implementation99
org/kuali/rice/kim/bo/role/dto/RoleResponsibilityActionInfo.javaRice KIM API37
	public String getRoleResponsibilityActionId() {
		return this.roleResponsibilityActionId;
	}
	public void setRoleResponsibilityActionId(String roleResponsibilityResolutionId) {
		this.roleResponsibilityActionId = roleResponsibilityResolutionId;
	}
	public String getRoleResponsibilityId() {
		return this.roleResponsibilityId;
	}
	public void setRoleResponsibilityId(String roleResponsibilityId) {
		this.roleResponsibilityId = roleResponsibilityId;
	}
	public String getActionTypeCode() {
		return this.actionTypeCode;
	}
	public void setActionTypeCode(String actionTypeCode) {
		this.actionTypeCode = actionTypeCode;
	}
	public Integer getPriorityNumber() {
		return this.priorityNumber;
	}
	public void setPriorityNumber(Integer priorityNumber) {
		this.priorityNumber = priorityNumber;
	}
	
	public String getActionPolicyCode() {
		return this.actionPolicyCode;
	}
	public void setActionPolicyCode(String actionPolicyCode) {
		this.actionPolicyCode = actionPolicyCode;
	}
	public String getRoleMemberId() {
		return this.roleMemberId;
	}
	public void setRoleMemberId(String roleMemberId) {
		this.roleMemberId = roleMemberId;
	}
	public RoleResponsibility getRoleResponsibility() {
FileProjectLine
org/kuali/rice/kew/document/RoutingRuleDelegationMaintainable.javaRice Implementation100
org/kuali/rice/kew/document/RoutingRuleMaintainable.javaRice Implementation88
    	KEWServiceLocator.getRuleService().makeCurrent(getThisRule(), true);
    }
    
    @Override
    public void processAfterCopy(MaintenanceDocument document, Map<String, String[]> parameters) {
    	WebRuleUtils.processRuleForCopy(document.getDocumentNumber(), getOldRule(document), getNewRule(document));
        super.processAfterCopy(document, parameters);
    }
    
	@Override
	public void processAfterEdit(MaintenanceDocument document,
			Map<String, String[]> parameters) {
		if (!getOldRule(document).getCurrentInd()) {
			throw new RiceRuntimeException("Cannot edit a non-current version of a rule.");
		}
		WebRuleUtils.populateForCopyOrEdit(getOldRule(document), getNewRule(document));
		
		getNewRule(document).setPreviousVersionId(getOldRule(document).getRuleBaseValuesId());       

		getNewRule(document).setDocumentId(document.getDocumentHeader().getDocumentNumber());
		super.processAfterEdit(document, parameters);
	}
FileProjectLine
org/kuali/rice/kew/attribute/XMLAttributeUtils.javaRice Implementation53
org/kuali/rice/kew/attribute/XMLAttributeUtils.javaRice Implementation90
        RemotableQuickFinder.Builder quickFinderBuilder = RemotableQuickFinder.Builder.create(baseLookupUrl, dataObjectClass);
		for (int lcIndex = 0; lcIndex < lookupNode.getChildNodes().getLength(); lcIndex++) {
			Map<String, String> fieldConversionsMap = new HashMap<String, String>();
			Node fieldConversionsChildNode = lookupNode.getChildNodes().item(lcIndex);
			if ("fieldConversions".equals(fieldConversionsChildNode)) {
				for (int fcIndex = 0; fcIndex < fieldConversionsChildNode.getChildNodes().getLength(); fcIndex++) {
					Node fieldConversionChildNode = fieldConversionsChildNode.getChildNodes().item(fcIndex);
					if ("fieldConversion".equals(fieldConversionChildNode)) {
						NamedNodeMap fieldConversionAttributes = fieldConversionChildNode.getAttributes();
						String lookupFieldName = fieldConversionAttributes.getNamedItem("lookupFieldName").getNodeValue();
						String localFieldName = fieldConversionAttributes.getNamedItem("localFieldName").getNodeValue();
						fieldConversionsMap.put(lookupFieldName, localFieldName);
					}
				}
			}
FileProjectLine
org/kuali/rice/core/api/criteria/EqualPredicate.javaRice Core API46
org/kuali/rice/core/api/criteria/NotEqualPredicate.javaRice Core API46
public final class NotEqualPredicate extends AbstractPredicate implements SingleValuedPredicate {
	
	private static final long serialVersionUID = 7159459561133496549L;
	
	@XmlAttribute(name = CriteriaSupportUtils.PropertyConstants.PROPERTY_PATH)
	private final String propertyPath;

	@XmlElements(value = {
    		@XmlElement(name = CriteriaStringValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaStringValue.class, required = true),
    		@XmlElement(name = CriteriaDateTimeValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDateTimeValue.class, required = true),
    		@XmlElement(name = CriteriaDecimalValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDecimalValue.class, required = true),
    		@XmlElement(name = CriteriaIntegerValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaIntegerValue.class, required = true)
    })
	private final CriteriaValue<?> value;

    @SuppressWarnings("unused")
    @XmlAnyElement
    private final Collection<Element> _futureElements = null;

    /**
     * Should only be invoked by JAXB.
     */
    @SuppressWarnings("unused")
    private NotEqualPredicate() {
FileProjectLine
org/kuali/rice/kew/config/ThinClientResourceLoader.javaRice Implementation231
org/kuali/rice/ksb/messaging/serviceconnectors/HttpInvokerConnector.javaRice Implementation137
		params.setIntParameter(HttpConnectionParams.SO_TIMEOUT, 2*60*1000);
		

		boolean retrySocketException = new Boolean(ConfigContext.getCurrentContextConfig().getProperty(RETRY_SOCKET_EXCEPTION_PROPERTY));
		if (retrySocketException) {
		    LOG.info("Installing custom HTTP retry handler to retry requests in face of SocketExceptions");
		    params.setParameter(HttpMethodParams.RETRY_HANDLER, new CustomHttpMethodRetryHandler());
		}

		
	}
	

	
	/**
	 * Idle connection timeout thread added as a part of the fix for ensuring that 
	 * threads that timed out need to be cleaned or and send back to the pool so that 
	 * other clients can use it.
	 *
	 */
	private void runIdleConnectionTimeout() {
	    if (ictt != null) {
		    String timeoutInterval = ConfigContext.getCurrentContextConfig().getProperty(IDLE_CONNECTION_THREAD_INTERVAL_PROPERTY);
		    if (StringUtils.isBlank(timeoutInterval)) {
			timeoutInterval = DEFAULT_IDLE_CONNECTION_THREAD_INTERVAL;
		    }
		    String connectionTimeout = ConfigContext.getCurrentContextConfig().getProperty(IDLE_CONNECTION_TIMEOUT_PROPERTY);
		    if (StringUtils.isBlank(connectionTimeout)) {
			connectionTimeout = DEFAULT_IDLE_CONNECTION_TIMEOUT;
		    }
		    
		    ictt.addConnectionManager(getHttpClient().getHttpConnectionManager());
		    ictt.setTimeoutInterval(new Integer(timeoutInterval));
		    ictt.setConnectionTimeout(new Integer(connectionTimeout));
		    //start the thread
		    ictt.start();
	    }
	}
FileProjectLine
org/kuali/rice/kew/actionrequest/dao/impl/ActionRequestDAOJpaImpl.javaRice Implementation246
org/kuali/rice/kew/actionrequest/dao/impl/ActionRequestDAOOjbImpl.javaRice Implementation97
    }

    private void loadDefaultValues(ActionRequestValue actionRequest) {
        checkNull(actionRequest.getActionRequested(), "action requested");
        checkNull(actionRequest.getResponsibilityId(), "responsibility ID");
        checkNull(actionRequest.getRouteLevel(), "route level");
        checkNull(actionRequest.getDocVersion(), "doc version");
        if (actionRequest.getForceAction() == null) {
            actionRequest.setForceAction(Boolean.FALSE);
        }
        if (actionRequest.getStatus() == null) {
            actionRequest.setStatus(ActionRequestStatus.INITIALIZED.getCode());
        }
        if (actionRequest.getPriority() == null) {
            actionRequest.setPriority(KEWConstants.ACTION_REQUEST_DEFAULT_PRIORITY);
        }
        if (actionRequest.getCurrentIndicator() == null) {
            actionRequest.setCurrentIndicator(true);
        }
        actionRequest.setCreateDate(new Timestamp(System.currentTimeMillis()));
    }

    //TODO Runtime might not be the right thing to do here...
    private void checkNull(Object value, String valueName) throws RuntimeException {
FileProjectLine
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.javaRice Implementation470
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.javaRice Implementation601
            ActionItem existingActionItem = actionItemMap.get(potentialActionItem.getDocumentId());
            if (existingActionItem == null || comparator.compare(potentialActionItem, existingActionItem) > 0) {
                actionItemMap.put(potentialActionItem.getDocumentId(), potentialActionItem);
            }
        }
        return actionItemMap.values();
    }

    /**
     * Creates an Action List from the given collection of Action Items.  The Action List should
     * contain only one action item per user.  The action item chosen should be the most "critical"
     * or "important" one on the document.
     *
     * @return the Action List as a Collection of ActionItems
     */
    private Collection<ActionItem> createActionListForRouteHeader(Collection<ActionItem> actionItems) {
        Map<String, ActionItem> actionItemMap = new HashMap<String, ActionItem>();
        ActionListPriorityComparator comparator = new ActionListPriorityComparator();
        for (ActionItem potentialActionItem: actionItems) {
            ActionItem existingActionItem = actionItemMap.get(potentialActionItem.getPrincipalId());
            if (existingActionItem == null || comparator.compare(potentialActionItem, existingActionItem) > 0) {
                actionItemMap.put(potentialActionItem.getPrincipalId(), potentialActionItem);
            }
        }
        return actionItemMap.values();
    }

    private Collection<ActionItem> getActionItemsInActionList(Class objectsToRetrieve, String principalId, ActionListFilter filter) {
FileProjectLine
org/kuali/rice/core/web/component/ComponentInquirableImpl.javaRice Core Web42
org/kuali/rice/core/web/component/ComponentInquirableImpl.javaRice Core Web82
		BusinessObject result = super.getBusinessObject(fieldValues);

		if (result == null) {

			String parameterDetailTypeCode = (String)fieldValues.get(PARAMETER_DETAIL_TYPE_CODE);
	        String parameterNamespaceCode = (String)fieldValues.get(PARAMETER_NAMESPACE_CODE);
			
	        if (parameterDetailTypeCode == null) throw new RuntimeException(PARAMETER_DETAIL_TYPE_CODE + 
	        		" is a required key for this inquiry");
	        if (parameterNamespaceCode == null) throw new RuntimeException(PARAMETER_NAMESPACE_CODE + 
	        		" is a required key for this inquiry");

			List<Component> components;
	        try {
	        	components = KRADServiceLocatorWeb.getRiceApplicationConfigurationMediationService().getNonDatabaseComponents();
	        } catch (DataDictionaryException ex) {
	            throw new RuntimeException(
	            		"Problem parsing data dictionary during full load required for inquiry to function: " + 
	            		ex.getMessage(), ex);
	        }
	        
	        for (Component pdt : components) {
	        	if (parameterDetailTypeCode.equals(pdt.getCode()) &&
	        			parameterNamespaceCode.equals(pdt.getNamespaceCode())) {
	        		result = ComponentBo.from(pdt);
	        		break;
	        	}
	        }
		}
		
		return result; 
	}
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.javaRice Implementation145
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.javaRice Implementation192
    }


    /**
     * @see org.kuali.rice.krad.service.PersistenceService#getFlattenedPrimaryKeyFieldValues(java.lang.Object)
     */
    public String getFlattenedPrimaryKeyFieldValues(Object persistableObject) {
        if (persistableObject == null) {
            throw new IllegalArgumentException("invalid (null) persistableObject");
        }
        Map primaryKeyValues = getPrimaryKeyFieldValues(persistableObject, true);

        StringBuffer flattened = new StringBuffer(persistableObject.getClass().getName());
        flattened.append("(");
        for (Iterator i = primaryKeyValues.entrySet().iterator(); i.hasNext();) {
            Map.Entry e = (Map.Entry) i.next();

            String fieldName = (String) e.getKey();
            Object fieldValue = e.getValue();

            flattened.append(fieldName + "=" + fieldValue);
            if (i.hasNext()) {
                flattened.append(",");
            }
        }

        flattened.append(")");

        return flattened.toString();

    }
FileProjectLine
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.javaRice Implementation405
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.javaRice Implementation138
    }

    private ReportQueryByCriteria getResponsibilitySubQuery(String ruleResponsibilityName) {
        Criteria responsibilityCrit = new Criteria();
        responsibilityCrit.addLike("ruleResponsibilityName", ruleResponsibilityName);
        ReportQueryByCriteria query = QueryFactory.newReportQuery(RuleResponsibility.class, responsibilityCrit);
        query.setAttributes(new String[] { "ruleBaseValuesId" });
        return query;
    }

    private ReportQueryByCriteria getWorkgroupResponsibilitySubQuery(Set<Long> workgroupIds) {
            Set<String> workgroupIdStrings = new HashSet<String>();
            for (Long workgroupId : workgroupIds) {
                workgroupIdStrings.add(workgroupId.toString());
            }
        Criteria responsibilityCrit = new Criteria();
        responsibilityCrit.addIn("ruleResponsibilityName", workgroupIds);
        responsibilityCrit.addEqualTo("ruleResponsibilityType", KEWConstants.RULE_RESPONSIBILITY_GROUP_ID);
        ReportQueryByCriteria query = QueryFactory.newReportQuery(RuleResponsibility.class, responsibilityCrit);
        query.setAttributes(new String[] { "ruleBaseValuesId" });
        return query;
    }
FileProjectLine
org/kuali/rice/kew/engine/StandardWorkflowEngine.javaRice Implementation376
org/kuali/rice/kew/engine/simulation/SimulationEngine.javaRice Implementation586
    	for (Iterator<RouteNodeInstance> iterator = nodeInstance.getNextNodeInstances().iterator(); iterator.hasNext();) {
    		RouteNodeInstance routeNodeInstance = (RouteNodeInstance) iterator.next();
    		if (routeNodeInstance.getRouteNodeInstanceId() == null) {
    			routeNodeInstance.setRouteNodeInstanceId(context.getEngineState().getNextSimulationId());
    		}
    	}
    	if (nodeInstance.getProcess() != null && nodeInstance.getProcess().getRouteNodeInstanceId() == null) {
    		nodeInstance.getProcess().setRouteNodeInstanceId(context.getEngineState().getNextSimulationId());
    	}
    	if (nodeInstance.getBranch() != null && nodeInstance.getBranch().getBranchId() == null) {
    		nodeInstance.getBranch().setBranchId(context.getEngineState().getNextSimulationId());
    	}
    }

}
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/type/HibernateKualiIntegerPercentFieldType.javaRice Core Framework46
org/kuali/rice/core/framework/persistence/jpa/type/HibernateKualiPercentFieldType.javaRice Core Framework48
        if (source != null && source instanceof BigDecimal) {
            BigDecimal converted = (BigDecimal) source;

            // Once we have converted, we need to convert again to KualiPercent.
            KualiPercent percentConverted = new KualiPercent((BigDecimal) converted);

            return percentConverted;

        }
        else {
            return null;
        }
	}

	/**
	 * This overridden method ...
	 * 
	 * @see HibernateImmutableValueUserType#nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int)
	 */
	@Override
	public void nullSafeSet(PreparedStatement st, Object source, int index)
			throws HibernateException, SQLException {
	       Object converted = source;

	        if (source instanceof KualiPercent) {
	            converted = ((KualiPercent) source).bigDecimalValue();
	        }

	        if (converted == null) {
	        	st.setNull(index, Types.DECIMAL); 
	        } else {
	        	st.setBigDecimal(index, ((BigDecimal)converted));
	        }
	}

	/**
	 * This overridden method ...
	 * 
	 * @see HibernateImmutableValueUserType#returnedClass()
	 */
	public Class returnedClass() {
		return BigDecimal.class;
	}

	/**
	 * Returns an array with the SQL VARCHAR type as the single member
	 * 
	 * @see org.hibernate.usertype.UserType#sqlTypes()
	 */
	public int[] sqlTypes() {
		return new int[] { Types.DECIMAL };
	}

}
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation324
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation201
        if (!(criteria instanceof Criteria) || StringUtils.isBlank(searchValue) || !ObjectUtils.isWriteable(example, propertyName, persistenceStructureService)) {
            return false;
        }

        // get property type which is used to determine type of criteria
        Class propertyType = ObjectUtils.getPropertyType(example, propertyName, persistenceStructureService);
        if (propertyType == null) {
            return false;
        }

		// build criteria
		if (example instanceof InactivatableFromTo) {
			if (KRADPropertyConstants.ACTIVE.equals(propertyName)) {
				addInactivateableFromToActiveCriteria(example, searchValue, (Criteria) criteria, searchValues);
			} else if (KRADPropertyConstants.CURRENT.equals(propertyName)) {
				addInactivateableFromToCurrentCriteria(example, searchValue, (Criteria) criteria, searchValues);
			} else if (!KRADPropertyConstants.ACTIVE_AS_OF_DATE.equals(propertyName)) {
				addCriteria(propertyName, searchValue, propertyType, caseInsensitive,
						treatWildcardsAndOperatorsAsLiteral, (Criteria) criteria);
			}
		} else {
			addCriteria(propertyName, searchValue, propertyType, caseInsensitive, treatWildcardsAndOperatorsAsLiteral,
					(Criteria) criteria);
		}
        
        return true;
    }

    /**
     * Find count of records meeting criteria based on the object and map.
     */
    public Long findCountByMap(Object example, Map formProps) {
FileProjectLine
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.javaRice Implementation164
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.javaRice Implementation256
            performanceLogger.log("Preparing rule: " + rule.getDescription());

            rule.setCurrentInd(Boolean.TRUE);
            Timestamp date = new Timestamp(System.currentTimeMillis());
            rule.setActivationDate(date);
            try {
                rule.setDeactivationDate(new Timestamp(RiceConstants.getDefaultDateFormat().parse("01/01/2100").getTime()));
            } catch (Exception e) {
                LOG.error("Parse Exception", e);
            }
            rulesToSave.put(rule.getRuleBaseValuesId(), rule);
            RuleBaseValues oldRule = rule.getPreviousVersion();
            if (oldRule != null) {
                performanceLogger.log("Setting previous rule: " + oldRule.getRuleBaseValuesId() + " to non current.");
                oldRule.setCurrentInd(Boolean.FALSE);
                oldRule.setDeactivationDate(date);
                rulesToSave.put(oldRule.getRuleBaseValuesId(), oldRule);
FileProjectLine
org/kuali/rice/krad/web/controller/UifControllerBase.javaRice KRAD Web Framework528
org/kuali/rice/krad/web/controller/UifControllerBase.javaRice KRAD Web Framework574
    AttributeQueryResult performFieldQuery(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
            HttpServletRequest request, HttpServletResponse response) {

        // retrieve query fields from request
        Map<String, String> queryParameters = new HashMap<String, String>();
        for (Object parameterName : request.getParameterMap().keySet()) {
            if (parameterName.toString().startsWith(UifParameters.QUERY_PARAMETER + ".")) {
                String fieldName = StringUtils.substringAfter(parameterName.toString(),
                        UifParameters.QUERY_PARAMETER + ".");
                String fieldValue = request.getParameter(parameterName.toString());
                queryParameters.put(fieldName, fieldValue);
            }
        }

        // retrieve id for field to perform query for
        String queryFieldId = request.getParameter(UifParameters.QUERY_FIELD_ID);
        if (StringUtils.isBlank(queryFieldId)) {
            throw new RuntimeException("Unable to find id for field to perform query on under request parameter name: "
                    + UifParameters.QUERY_FIELD_ID);
        }
FileProjectLine
org/kuali/rice/core/api/criteria/InPredicate.javaRice Core API53
org/kuali/rice/core/api/criteria/NotInPredicate.javaRice Core API53
	@XmlAttribute(name = CriteriaSupportUtils.PropertyConstants.PROPERTY_PATH)
	private final String propertyPath;

	@XmlElements(value = {
            @XmlElement(name = CriteriaStringValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaStringValue.class, required = true),
            @XmlElement(name = CriteriaDateTimeValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDateTimeValue.class, required = true),
            @XmlElement(name = CriteriaIntegerValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaIntegerValue.class, required = true),
            @XmlElement(name = CriteriaDecimalValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDecimalValue.class, required = true)
	})
	private final Set<? extends CriteriaValue<?>> values;

    @SuppressWarnings("unused")
    @XmlAnyElement
    private final Collection<Element> _futureElements = null;

	/**
     * Should only be invoked by JAXB.
     */
    @SuppressWarnings("unused")
    private NotInPredicate() {
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation169
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation122
        List pkFields = KRADServiceLocatorWeb.getDataObjectMetaDataService().listPrimaryKeyFieldNames(businessObjectClass);
        Iterator pkIter = pkFields.iterator();
        while (pkIter.hasNext()) {
            String pkFieldName = (String) pkIter.next();
            String pkValue = (String) formProps.get(pkFieldName);

            if (StringUtils.isBlank(pkValue)) {
                throw new RuntimeException("Missing pk value for field " + pkFieldName + " when a search based on PK values only is performed.");
            }
            else {
                for (SearchOperator op : SearchOperator.QUERY_CHARACTERS) {
                    if (pkValue.contains(op.op())) {
                        throw new RuntimeException("Value \"" + pkValue + "\" for PK field " + pkFieldName + " contains wildcard/operator characters.");
                    }
                }
            }
            boolean treatWildcardsAndOperatorsAsLiteral = KRADServiceLocatorWeb.
            		getBusinessObjectDictionaryService().isLookupFieldTreatWildcardsAndOperatorsAsLiteral(businessObjectClass, pkFieldName);
            createCriteria(businessObject, pkValue, pkFieldName, false, treatWildcardsAndOperatorsAsLiteral, criteria);
        }
        return criteria;
    }
    
    private BusinessObject checkBusinessObjectClass(Class businessObjectClass) {
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.javaRice Core Framework110
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.javaRice Core Framework163
					final Object value = field.get(owner);
					if (value != null) {
						final Field fieldToSet = getField(pkObject.getClass(), fieldDescriptor.getName());
						fieldToSet.setAccessible(true);
						fieldToSet.set(pkObject, value);
					}
				}
				
				return pkObject;
			} catch (SecurityException se) {
				LOG.error(se.getMessage(), se);
			} catch (InstantiationException ie) {
				LOG.error(ie.getMessage(), ie);
			} catch (IllegalAccessException iae) {
				LOG.error(iae.getMessage(), iae);
			} catch (NoSuchFieldException nsfe) {
				LOG.error(nsfe.getMessage(), nsfe);
			}
		} else {
			for (FieldDescriptor fieldDescriptor : descriptor.getPrimaryKeys()) {
				try {
					Field field = getField(owner.getClass(), fieldDescriptor.getName());
FileProjectLine
org/kuali/rice/kew/dto/package-info.javaRice API17
org/kuali/rice/kew/service/package-info.javaRice API17
@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters({
	@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(value=org.kuali.rice.core.api.util.jaxb.MapStringStringAdapter.class,type=Map.class),
	@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(value=org.kuali.rice.core.api.util.jaxb.SqlDateAdapter.class,type=java.sql.Date.class),
	@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(value=org.kuali.rice.core.api.util.jaxb.SqlTimestampAdapter.class,type=java.sql.Timestamp.class)
})
FileProjectLine
org/kuali/rice/kns/web/struts/action/KualiLookupAction.javaRice KNS266
org/kuali/rice/kns/web/struts/action/KualiLookupAction.javaRice KNS296
            for (Iterator iter = kualiLookupable.getRows().iterator(); iter.hasNext();) {
                Row row = (Row) iter.next();
                for (Object element : row.getFields()) {
                    Field field = (Field) element;
                    if (field.getPropertyName() != null && !field.getPropertyName().equals("")) {
                        if (request.getParameter(field.getPropertyName()) != null) {
//                            field.setPropertyValue(request.getParameter(field.getPropertyName()));
            				if(!Field.MULTI_VALUE_FIELD_TYPES.contains(field.getFieldType())) {
            					field.setPropertyValue(request.getParameter(field.getPropertyName()));
            				} else {
            					//multi value, set to values
            					field.setPropertyValues(request.getParameterValues(field.getPropertyName()));
            				}
FileProjectLine
org/kuali/rice/kew/bo/lookup/DocSearchCriteriaDTOLookupableHelperServiceImpl.javaRice Implementation821
org/kuali/rice/kew/bo/lookup/DocSearchCriteriaDTOLookupableHelperServiceImpl.javaRice Implementation844
			            for (Row row : this.getRows()) {
			                for (Field field : row.getFields()) {
			                    if (field.getPropertyName() != null && !field.getPropertyName().equals("")) {
			                        if (this.getParameters().get(field.getPropertyName()) != null) {
			                        	if(!Field.MULTI_VALUE_FIELD_TYPES.contains(field.getFieldType())) {
			            					field.setPropertyValue(((String[])this.getParameters().get(field.getPropertyName()))[0]);
			            				} else {
			            					//multi value, set to values
			            					field.setPropertyValues((String[])this.getParameters().get(field.getPropertyName()));
			            				}
FileProjectLine
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.javaRice Implementation183
org/kuali/rice/ken/web/spring/SendNotificationMessageController.javaRice Implementation189
    private Map<String, Object> setupModelForSendSimpleNotification(
            HttpServletRequest request) {
        Map<String, Object> model = new HashMap<String, Object>();
        model.put("defaultSender", request.getRemoteUser());
        model.put("channels", notificationChannelService
                .getAllNotificationChannels());
        model.put("priorities", businessObjectDao
                .findAll(NotificationPriority.class));
        // set sendDateTime to current datetime if not provided
        String sendDateTime = request.getParameter("sendDateTime");
        String currentDateTime = Util.getCurrentDateTime();
        if (StringUtils.isEmpty(sendDateTime)) {
            sendDateTime = currentDateTime;
        }
        model.put("sendDateTime", sendDateTime);

        // retain the original date time or set to current if
        // it was not in the request
        if (request.getParameter("originalDateTime") == null) {
            model.put("originalDateTime", currentDateTime);
        } else {
            model.put("originalDateTime", request.getParameter("originalDateTime"));
        }

        model.put("userRecipients", request.getParameter("userRecipients"));
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.javaRice Core Framework53
org/kuali/rice/core/framework/persistence/jpa/metadata/OneToOneDescriptor.javaRice Core Framework51
			sb.append(", mappedBy:").append(mappedBy);
		}
		if (!joinColumnDescriptors.isEmpty()) {
			sb.append(", join columns = { ");
			for (JoinColumnDescriptor joinColumnDescriptor : joinColumnDescriptors) {				
				sb.append(" jc = { ");
				sb.append("name:").append(joinColumnDescriptor.getName()).append(", ");
				sb.append("insertable:").append(joinColumnDescriptor.isInsertable()).append(", ");
				sb.append("nullable:").append(joinColumnDescriptor.isNullable()).append(", ");
				sb.append("unique:").append(joinColumnDescriptor.isUnique()).append(", ");
				sb.append("updateable:").append(joinColumnDescriptor.isUpdateable());
				sb.append(" }");
			}
			sb.append(" } ");
		}
FileProjectLine
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.javaRice KRAD Web Framework683
org/kuali/rice/krms/impl/rule/AgendaEditorBusRule.javaRice KRMS Impl52
        Object newDataObject = ((AgendaEditor) document.getNewMaintainableObject().getDataObject()).getAgenda();

        // We dont do primaryKeyChecks on Global Business Object maintenance documents. This is
        // because it doesnt really make any sense to do so, given the behavior of Globals. When a
        // Global Document completes, it will update or create a new record for each BO in the list.
        // As a result, there's no problem with having existing BO records in the system, they will
        // simply get updated.
        if (newDataObject instanceof GlobalBusinessObject) {
            return success;
        }

        // fail and complain if the person has changed the primary keys on
        // an EDIT maintenance document.
        if (document.isEdit()) {
            if (!getDataObjectMetaDataService().equalsByPrimaryKeys(oldBo, newDataObject)) {
                // add a complaint to the errors
                putDocumentError(KRADConstants.DOCUMENT_ERRORS,
                        RiceKeyConstants.ERROR_DOCUMENT_MAINTENANCE_PRIMARY_KEYS_CHANGED_ON_EDIT,
                        getHumanReadablePrimaryKeyFieldNames(dataObjectClass));
                success &= false;
            }
        }

        // fail and complain if the person has selected a new object with keys that already exist
        // in the DB.
        else if (document.isNew()) {

            // TODO: when/if we have standard support for DO retrieval, do this check for DO's
            if (newDataObject instanceof PersistableBusinessObject) {

                // get a map of the pk field names and values
                Map<String, ?> newPkFields = getDataObjectMetaDataService().getPrimaryKeyFieldValues(newDataObject);

                // TODO: Good suggestion from Aaron, dont bother checking the DB, if all of the
                // objects PK fields dont have values. If any are null or empty, then
                // we're done. The current way wont fail, but it will make a wasteful
                // DB call that may not be necessary, and we want to minimize these.

                // attempt to do a lookup, see if this object already exists by these Primary Keys
                PersistableBusinessObject testBo = getBoService()
                        .findByPrimaryKey(dataObjectClass.asSubclass(PersistableBusinessObject.class), newPkFields);

                // if the retrieve was successful, then this object already exists, and we need
                // to complain
                if (testBo != null) {
                    putDocumentError(KRADConstants.DOCUMENT_ERRORS,
                            RiceKeyConstants.ERROR_DOCUMENT_MAINTENANCE_KEYS_ALREADY_EXIST_ON_CREATE_NEW,
                            getHumanReadablePrimaryKeyFieldNames(dataObjectClass));
                    success &= false;
                }
            }
        }

        return success;
    }
FileProjectLine
org/kuali/rice/core/api/criteria/InIgnoreCasePredicate.javaRice Core API84
org/kuali/rice/core/api/criteria/NotInIgnoreCasePredicate.javaRice Core API84
    NotInIgnoreCasePredicate(String propertyPath, Set<CriteriaStringValue> values) {
    	if (StringUtils.isBlank(propertyPath)) {
			throw new IllegalArgumentException("Property path cannot be null or blank.");
		}
		this.propertyPath = propertyPath;

        if (values == null) {
            this.values = Collections.emptySet();
        } else {
            final Set<CriteriaStringValue> temp = new HashSet<CriteriaStringValue>();
            for (CriteriaStringValue value: values) {
                if (value != null) {
                    temp.add(value);
                }
            }
            this.values = Collections.unmodifiableSet(temp);
        }
    }

    @Override
    public String getPropertyPath() {
    	return propertyPath;
    }
    
    @Override
    public Set<CriteriaStringValue> getValues() {
    	return Collections.unmodifiableSet(values);
    }
        
	/**
     * Defines some internal constants used on this class.
     */
    static class Constants {
        final static String ROOT_ELEMENT_NAME = "notInIgnoreCase";
FileProjectLine
org/kuali/rice/kew/actions/ActionRegistryImpl.javaRice Implementation135
org/kuali/rice/kew/actions/ActionRegistryImpl.javaRice Implementation158
    		List<ActionRequestValue> activeRequests = new ArrayList<ActionRequestValue>();
    		for ( ActionRequestValue ar : document.getActionRequests() ) {
    			if ( (ar.getCurrentIndicator() != null && ar.getCurrentIndicator()) && StringUtils.equals( ar.getStatus(), ActionRequestStatus.ACTIVATED.getCode() ) ) {
    				activeRequests.add(ar);
    			}
    		}
    		for (String actionTakenCode : actionMap.keySet())
    		{
    			List<DataDefinition> parameters = new ArrayList<DataDefinition>();
    			parameters.add(new DataDefinition(document));
    			parameters.add(new DataDefinition(principal));
    			ActionTakenEvent actionEvent = createAction(actionTakenCode, parameters);
    			if (StringUtils.isEmpty(actionEvent.validateActionRules(activeRequests)))
    			{
FileProjectLine
org/kuali/rice/edl/impl/components/NetworkIdWorkflowEDLConfigComponent.javaRice EDL Impl36
org/kuali/rice/edl/impl/components/UniversityIdWorkflowEDLConfigComponent.javaRice EDL Impl37
	@Override
	public Element getReplacementConfigElement(Element element) {
		Element replacementEl = (Element)element.cloneNode(true);
		Element type = (Element)((NodeList)replacementEl.getElementsByTagName(EDLXmlUtils.TYPE_E)).item(0);
		type.setTextContent("text");
		
		//find the validation element if required is true set a boolean and determine if blanks
		//are allowed based on that
		Element validation = (Element)((NodeList)replacementEl.getElementsByTagName(EDLXmlUtils.VALIDATION_E)).item(0);
		if (validation != null && validation.getAttribute("required").equals("true")) {
			required = true;
		}
		return replacementEl;
	}
	
	@Override
	public String getErrorMessage(Element originalConfigElement, RequestParser requestParser, MatchingParam param) {
		
		if (param.getParamValue().length() == 0 && required == true) {
			//empty and required so send error
			return ("Workgroup is a required field");
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.javaRice Core Framework55
org/kuali/rice/core/framework/persistence/jpa/metadata/ObjectDescriptor.javaRice Core Framework126
		if (!joinColumnDescriptors.isEmpty()) {
			sb.append(", join columns = { ");
			for (JoinColumnDescriptor joinColumnDescriptor : joinColumnDescriptors) {				
				sb.append(" jc = { ");
				sb.append("name:").append(joinColumnDescriptor.getName()).append(", ");
				sb.append("insertable:").append(joinColumnDescriptor.isInsertable()).append(", ");
				sb.append("nullable:").append(joinColumnDescriptor.isNullable()).append(", ");
				sb.append("unique:").append(joinColumnDescriptor.isUnique()).append(", ");
				sb.append("updateable:").append(joinColumnDescriptor.isUpdateable());
				sb.append(" }");
			}
			sb.append(" } ");
		}
FileProjectLine
org/kuali/rice/kim/impl/permission/PermissionServiceImpl.javaRice KIM Impl335
org/kuali/rice/kim/impl/permission/PermissionServiceImpl.javaRice KIM Impl358
    	List<String> roleIds = getRoleIdsForPermissionTemplate( namespaceCode, permissionTemplateName, permissionDetails);
    	if ( roleIds.isEmpty() ) {
    		return results;
    	}
    	Collection<RoleMembership> roleMembers = roleService.getRoleMembers( roleIds,qualification);
    	for ( RoleMembership rm : roleMembers ) {
			List<DelegateType.Builder> delegateBuilderList = new ArrayList<DelegateType.Builder>();
			if (!rm.getDelegates().isEmpty()) {
    			for (DelegateType delegate : rm.getDelegates()){
                    delegateBuilderList.add(DelegateType.Builder.create(delegate));
    			}
			}
    		if ( rm.getMemberTypeCode().equals( Role.PRINCIPAL_MEMBER_TYPE ) ) {
    			results.add (Assignee.Builder.create(rm.getMemberId(), null, delegateBuilderList).build());
    		} else { // a group membership
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation564
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation449
	}

    /**
     * @param propertyName
     * @param propertyValue
     * @param propertyType
     * @param criteria
     */
    private void addOrCriteria(String propertyName, String propertyValue, Class propertyType, boolean caseInsensitive, Criteria criteria) {
        addLogicalOperatorCriteria(propertyName, propertyValue, propertyType, caseInsensitive, criteria, SearchOperator.OR.op());
    }
       
    /**
     * @param propertyName
     * @param propertyValue
     * @param propertyType
     * @param criteria
     */
    private void addAndCriteria(String propertyName, String propertyValue, Class propertyType, boolean caseInsensitive, Criteria criteria) {
        addLogicalOperatorCriteria(propertyName, propertyValue, propertyType, caseInsensitive, criteria, SearchOperator.AND.op());
    }

    private void addNotCriteria(String propertyName, String propertyValue, Class propertyType, boolean caseInsensitive, Criteria criteria) {

        String[] splitPropVal = StringUtils.split(propertyValue, SearchOperator.NOT.op());

        int strLength = splitPropVal.length;
        // if more than one NOT operator assume an implicit and (i.e. !a!b = !a&!b)
        if (strLength > 1) {
            String expandedNot = SearchOperator.NOT + StringUtils.join(splitPropVal, SearchOperator.AND.op() + SearchOperator.NOT.op());
FileProjectLine
org/kuali/rice/kew/actions/ApproveAction.javaRice Implementation94
org/kuali/rice/kew/actions/CompleteAction.javaRice Implementation93
    public boolean isActionCompatibleRequest(List requests) {
        // we allow pre-approval
        if (requests.isEmpty()) {
            return true;
        }

        // can always cancel saved or initiated document
        if (routeHeader.isStateInitiated() || routeHeader.isStateSaved()) {
            return true;
        }

        boolean actionCompatible = false;
        Iterator ars = requests.iterator();
        ActionRequestValue actionRequest = null;

        while (ars.hasNext()) {
            actionRequest = (ActionRequestValue) ars.next();
            String request = actionRequest.getActionRequested();

            // Complete action matches Complete, Approve, FYI, and ACK requests
            if ( (KEWConstants.ACTION_REQUEST_FYI_REQ.equals(request)) ||
                    (KEWConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ.equals(request)) ||
                    (KEWConstants.ACTION_REQUEST_APPROVE_REQ.equals(request)) ||
                    (KEWConstants.ACTION_REQUEST_COMPLETE_REQ.equals(request)) ) {
                actionCompatible = true;
                break;
            }
        }
        return actionCompatible;
    }

    /**
     * Records the complete action. - Checks to make sure the document status allows the action. - Checks that the user has not taken a previous action. - Deactivates the pending requests for this user - Records the action
     *
     * @throws InvalidActionTakenException
     * @throws ResourceUnavailableException
     */
    public void recordAction() throws org.kuali.rice.kew.exception.InvalidActionTakenException {
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation382
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation345
                    	newPair = new ConcreteKeyValue(pair.getKey(), KEWConstants.HTML_NON_BREAKING_SPACE);
                    }
                    myNewColumns.getColumns().add(newPair);
                    record.getFieldValues().put(newPair.getKey(), newPair.getValue());
                }
                record.setMyColumns(myNewColumns);
            }

            StringBuffer returnUrl = new StringBuffer("<a href=\"");
            returnUrl.append(fieldValues.get(BACK_LOCATION)).append("?methodToCall=refresh&docFormKey=").append(fieldValues.get(DOC_FORM_KEY)).append("&");

            returnUrl.append(RULE_ID_PROPERTY_NAME);
            returnUrl.append("=").append(record.getRuleBaseValuesId()).append("\">return value</a>");
            record.setReturnUrl(returnUrl.toString());

            String destinationUrl = "<a href=\"Rule.do?methodToCall=report&currentRuleId=" + record.getRuleBaseValuesId() + "\">report</a>";

            record.setDestinationUrl(destinationUrl);

            displayList.add(ruleDelegation);
FileProjectLine
org/kuali/rice/kew/doctype/bo/DocumentType.javaRice Implementation952
org/kuali/rice/kew/doctype/bo/DocumentType.javaRice Implementation978
    private DocumentTypePolicy getPolicyByName(String policyName, String defaultValue) {

        Iterator policyIter = getDocumentTypePolicies().iterator();
        while (policyIter.hasNext()) {
            DocumentTypePolicy policy = (DocumentTypePolicy) policyIter.next();
            if (policyName.equals(policy.getPolicyName())) {
                policy.setInheritedFlag(Boolean.FALSE);
                return policy;
            }
        }

        if (getParentDocType() != null) {
            DocumentTypePolicy policy = getParentDocType().getPolicyByName(policyName, defaultValue);
            policy.setInheritedFlag(Boolean.TRUE);
            if (policy.getPolicyValue() == null) {
                policy.setPolicyValue(Boolean.TRUE);
            }
            return policy;
        }
        DocumentTypePolicy policy = new DocumentTypePolicy();
        policy.setPolicyName(policyName);
        policy.setInheritedFlag(Boolean.FALSE);
        policy.setPolicyValue(Boolean.TRUE);
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation528
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation490
                        throw new RuntimeException("Cannot access PropertyType for property " + "'" + curPropName + "' " + " on an instance of '" + element.getClass().getName() + "'.", e);
                    }
                }

                // formatters
                if (prop != null) {
                    // for Booleans, always use BooleanFormatter
                    if (prop instanceof Boolean) {
                        formatter = new BooleanFormatter();
                    }

                    // for Dates, always use DateFormatter
                    if (prop instanceof Date) {
                        formatter = new DateFormatter();
                    }

                    // for collection, use the list formatter if a formatter hasn't been defined yet
                    if (prop instanceof Collection && formatter == null) {
                    formatter = new CollectionFormatter();
                    }

                    if (formatter != null) {
                        propValue = (String) formatter.format(prop);
                    }
                    else {
                        propValue = prop.toString();
                    }
                }

                // comparator
                col.setComparator(CellComparatorHelper.getAppropriateComparatorForPropertyClass(propClass));
                col.setValueComparator(CellComparatorHelper.getAppropriateValueComparatorForPropertyClass(propClass));

                propValue = maskValueIfNecessary(element.getClass(), curPropName, propValue, businessObjectRestrictions);
FileProjectLine
org/kuali/rice/kns/datadictionary/validation/charlevel/CharsetValidationPattern.javaRice KNS29
org/kuali/rice/krad/datadictionary/validation/constraint/CharsetPatternConstraint.javaRice KRAD Web Framework32
public class CharsetPatternConstraint extends ValidCharactersPatternConstraint {
    protected String validChars;

    /**
     * @return String containing all valid chars for this charset
     */
    public String getValidChars() {
        return validChars;
    }

    /**
     * @param validChars for this charset
     */
    public void setValidChars(String validChars) {
        if (StringUtils.isEmpty(validChars)) {
            throw new IllegalArgumentException("invalid (empty) validChars");
        }

        this.validChars = validChars;
    }


    /**
     * Escapes every special character I could think of, to limit potential misuse of this pattern.
     * 
     * @see org.kuali.rice.krad.datadictionary.validation.ValidationPattern#getRegexString()
     */
    protected String getRegexString() {
        if (StringUtils.isEmpty(validChars)) {
            throw new IllegalStateException("validChars is empty");
        }

        // filter out and escape chars which would confuse the pattern-matcher
        Pattern filteringChars = Pattern.compile("([\\-\\[\\]\\{\\}\\$\\.\\^\\(\\)\\*\\&\\|])");
        String filteredChars = filteringChars.matcher(validChars).replaceAll("\\\\$1");

        StringBuffer regexString = new StringBuffer("[");
        regexString.append(filteredChars);
        if (filteredChars.endsWith("\\")) {
            regexString.append("\\");
        }
        regexString.append("]");

        return regexString.toString();
    }
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation1423
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation2417
								StringUtils.equals(origDelegationImpl.getDelegationId(), newKimDelegation.getDelegationId())){
							//TODO: verify if you want to add  && newRoleMember.isActive() condition to if...
							newDelegationIdAssigned = newKimDelegation.getDelegationId();
							newKimDelegation.setDelegationId(origDelegationImpl.getDelegationId());
							activatingInactive = true;
						}
						if(origDelegationImpl.getDelegationId()!=null && StringUtils.equals(origDelegationImpl.getDelegationId(), newKimDelegation.getDelegationId())){
							newKimDelegation.setVersionNumber(origDelegationImpl.getVersionNumber());
							origDelegationImplTemp = origDelegationImpl;
						}
					}
				}
				origMembers = (origDelegationImplTemp == null || origDelegationImplTemp.getMembers()==null)?
									new ArrayList<DelegateMemberBo>():origDelegationImplTemp.getMembers();
				newKimDelegation.setMembers(getDelegationMembers(roleDocumentDelegation.getMembers(), origMembers, activatingInactive, newDelegationIdAssigned));
                kimDelegations.add(newKimDelegation);
				activatingInactive = false;
			}
		}
		return kimDelegations;
	}

	protected List<DelegateMemberBo> getDelegationMembers(List<RoleDocumentDelegationMember> delegationMembers,
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation401
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation1942
				pndMember.setActive(member.isActive(new Timestamp(System.currentTimeMillis())));
				if(pndMember.isActive()){
					KimCommonUtilsInternal.copyProperties(pndMember, member);
					pndMember.setRoleMemberId(member.getRoleMemberId());
					roleMember = getRoleMemberForRoleMemberId(member.getRoleMemberId());
					if(roleMember!=null){
						pndMember.setRoleMemberName(getMemberName(roleMember.getMemberTypeCode(), roleMember.getMemberId()));
						pndMember.setRoleMemberNamespaceCode(getMemberNamespaceCode(roleMember.getMemberTypeCode(), roleMember.getMemberId()));
					}
					pndMember.setMemberNamespaceCode(getMemberNamespaceCode(member.getTypeCode(), member.getMemberId()));
					pndMember.setMemberName(getMemberName(member.getTypeCode(), member.getMemberId()));
					pndMember.setEdit(true);
					pndMember.setQualifiers(loadDelegationMemberQualifiers(identityManagementRoleDocument, member.getAttributes()));
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl62
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl171
    @RequestMapping(params = "methodToCall=" + "refresh")
    @Override
    public ModelAndView refresh(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        MapUtils.verbosePrint(System.out, "actionParameters", form.getActionParameters());
        MapUtils.verbosePrint(System.out, "requestParameters", request.getParameterMap());
        
        String agendaId = null;

        MaintenanceForm maintenanceForm = (MaintenanceForm) form;
        String conversionFields = maintenanceForm.getActionParameters().get("conversionFields");
        String refreshCaller = request.getParameter("refreshCaller");

        // handle return from agenda lookup
        // TODO: this condition is sloppy 
        if (refreshCaller != null && refreshCaller.contains("Agenda") && refreshCaller.contains("LookupView") &&
                conversionFields != null &&
                // TODO: this is sloppy
                conversionFields.contains("agenda.id")) {
            AgendaEditor editorDocument =
FileProjectLine
org/kuali/rice/kns/web/struts/action/KualiDocumentActionBase.javaRice KNS628
org/kuali/rice/krad/web/controller/DocumentControllerBase.javaRice KRAD Web Framework558
		boolean warnForSensitiveData = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsBoolean(
				KRADConstants.KRAD_NAMESPACE, ParameterConstants.ALL_COMPONENT,
				KRADConstants.SystemGroupParameterNames.SENSITIVE_DATA_PATTERNS_WARNING_IND);

		// determine if the question has been asked yet
		Map<String, String> ticketContext = new HashMap<String, String>();
		ticketContext.put(KRADPropertyConstants.DOCUMENT_NUMBER, document.getDocumentNumber());
		ticketContext.put(KRADConstants.CALLING_METHOD, caller);
		ticketContext.put(KRADPropertyConstants.NAME, fieldName);

		boolean questionAsked = GlobalVariables.getUserSession().hasMatchingSessionTicket(
				KRADConstants.SENSITIVE_DATA_QUESTION_SESSION_TICKET, ticketContext);

		// start in logic for confirming the sensitive data
		if (containsSensitiveData && warnForSensitiveData && !questionAsked) {
			Object question = request.getParameter(KRADConstants.QUESTION_INST_ATTRIBUTE_NAME);
			if (question == null || !KRADConstants.DOCUMENT_SENSITIVE_DATA_QUESTION.equals(question)) {
FileProjectLine
org/kuali/rice/kns/web/struts/action/KualiAction.javaRice KNS880
org/kuali/rice/krad/web/controller/UifControllerBase.javaRice KRAD Web Framework155
    public void checkAuthorization(UifFormBase form, String methodToCall) throws AuthorizationException {
        String principalId = GlobalVariables.getUserSession().getPrincipalId();
        Map<String, String> roleQualifier = new HashMap<String, String>(getRoleQualification(form, methodToCall));
        Map<String, String> permissionDetails = KRADUtils.getNamespaceAndActionClass(this.getClass());

        if (!KimApiServiceLocator.getPermissionService().isAuthorizedByTemplateName(principalId,
                KRADConstants.KRAD_NAMESPACE, KimConstants.PermissionTemplateNames.USE_SCREEN, permissionDetails,
                roleQualifier)) {
            throw new AuthorizationException(GlobalVariables.getUserSession().getPerson().getPrincipalName(),
                    methodToCall, this.getClass().getSimpleName());
        }
    }

    /**
     * Override this method to add data from the form for role qualification in
     * the authorization check
     */
    protected Map<String, String> getRoleQualification(UifFormBase form, String methodToCall) {
FileProjectLine
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.javaRice Implementation221
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.javaRice Implementation241
                Criteria userCrit = new Criteria();
                Criteria groupCrit = new Criteria();
                Criteria orCrit = new Criteria();
                userCrit.addEqualTo("delegatorPrincipalId", principalId);
                List<String> delegatorGroupIds = KimApiServiceLocator.getGroupService().getGroupIdsForPrincipal(principalId);
                if (delegatorGroupIds != null && !delegatorGroupIds.isEmpty()) {
                	groupCrit.addIn("delegatorGroupId", delegatorGroupIds);
                }
                orCrit.addOrCriteria(userCrit);
                orCrit.addOrCriteria(groupCrit);
                crit.addAndCriteria(orCrit);
                crit.addEqualTo("delegationType", DelegationType.PRIMARY.getCode());
                filter.setDelegationType(DelegationType.PRIMARY.getCode());
                filter.setExcludeDelegationType(false);
                addToFilterDescription(filteredByItems, "Primary Delegator Id");
                addedDelegationCriteria = true;
                filterOn = true;
            }
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.javaRice Core Framework70
org/kuali/rice/core/framework/persistence/jpa/metadata/OneToOneDescriptor.javaRice Core Framework55
			for (JoinColumnDescriptor joinColumnDescriptor : joinColumnDescriptors) {				
				sb.append(" jc = { ");
				sb.append("name:").append(joinColumnDescriptor.getName()).append(", ");
				sb.append("insertable:").append(joinColumnDescriptor.isInsertable()).append(", ");
				sb.append("nullable:").append(joinColumnDescriptor.isNullable()).append(", ");
				sb.append("unique:").append(joinColumnDescriptor.isUnique()).append(", ");
				sb.append("updateable:").append(joinColumnDescriptor.isUpdateable());
				sb.append(" }");
			}
			sb.append(" } ");
		}
		sb.append(" ]");
		return sb.toString();
	}
	
}
FileProjectLine
org/kuali/rice/core/api/criteria/GreaterThanOrEqualPredicate.javaRice Core API46
org/kuali/rice/core/api/criteria/LessThanOrEqualPredicate.javaRice Core API46
public final class LessThanPredicate extends AbstractPredicate implements SingleValuedPredicate {
	    
	private static final long serialVersionUID = 2576163857285296720L;
	
	@XmlAttribute(name = CriteriaSupportUtils.PropertyConstants.PROPERTY_PATH)
	private final String propertyPath;

	@XmlElements(value = {
			@XmlElement(name = CriteriaDecimalValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDecimalValue.class, required = true),
            @XmlElement(name = CriteriaIntegerValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaIntegerValue.class, required = true),
            @XmlElement(name = CriteriaDateTimeValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDateTimeValue.class, required = true)
    })
	private final CriteriaValue<?> value;

    @SuppressWarnings("unused")
    @XmlAnyElement
    private final Collection<Element> _futureElements = null;

	/**
     * Should only be invoked by JAXB.
     */
    @SuppressWarnings("unused")
    private LessThanPredicate() {
FileProjectLine
org/kuali/rice/krad/util/ObjectUtils.javaRice KRAD Web Framework515
org/kuali/rice/krad/util/ObjectUtils.javaRice KRAD Web Framework557
        if (depth == 0 || isNull(bo) || !PropertyUtils.isReadable(bo, propertyName)) {
            return;
        }

        // need to materialize the updateable collections before resetting the property, because it may be used in the retrieval
        materializeUpdateableCollections(bo);

        // Set the property in the BO
        setObjectProperty(bo, propertyName, type, propertyValue);

        // Now drill down and check nested BOs and BO lists
        PropertyDescriptor[] propertyDescriptors = PropertyUtils.getPropertyDescriptors(bo.getClass());
        for (int i = 0; i < propertyDescriptors.length; i++) {
            PropertyDescriptor propertyDescriptor = propertyDescriptors[i];

            // Business Objects
            if (propertyDescriptor.getPropertyType() != null && (BusinessObject.class).isAssignableFrom(propertyDescriptor.getPropertyType()) && PropertyUtils.isReadable(bo, propertyDescriptor.getName())) {
                Object nestedBo = getPropertyValue(bo, propertyDescriptor.getName());
                if (nestedBo instanceof BusinessObject) {
                    setObjectPropertyDeep((BusinessObject) nestedBo, propertyName, type, propertyValue, depth - 1);
FileProjectLine
org/kuali/rice/krad/uif/view/History.javaRice KRAD Web Framework200
org/kuali/rice/krad/uif/view/History.javaRice KRAD Web Framework233
        for (int j = 0; j < historyEntries.size(); j++) {
            historyParam = historyParam + ENTRY_TOKEN + historyEntries.get(j).toParam();
        }
        historyParam = historyParam.replaceFirst("\\" + ENTRY_TOKEN, "");

        try {
            historyParam = URLEncoder.encode(historyParam, "UTF-8");
        } catch (Exception e) {
            LOG.error("Error encoding history param", e);
        }

        String url = "";
        if (breadcrumb.getUrl().contains("?")) {
            url = breadcrumb.getUrl() + "&" + UifConstants.UrlParams.HISTORY + "=" + historyParam;
        } else {
            url = breadcrumb.getUrl() + "?" + UifConstants.UrlParams.HISTORY + "=" + historyParam;
        }
        breadcrumb.setUrl(url);
FileProjectLine
org/kuali/rice/kim/api/identity/employment/EntityEmployment.javaRice KIM API128
org/kuali/rice/kim/api/identity/employment/EntityEmployment.javaRice KIM API250
        public Type.Builder getEmployeeType() {
            return this.employeeType;
        }

        @Override
        public String getPrimaryDepartmentCode() {
            return this.primaryDepartmentCode;
        }

        @Override
        public String getEmployeeId() {
            return this.employeeId;
        }

        @Override
        public String getEmploymentRecordId() {
            return this.employmentRecordId;
        }

        @Override
        public KualiDecimal getBaseSalaryAmount() {
            return this.baseSalaryAmount;
        }

        @Override
        public boolean isPrimary() {
            return this.primary;
        }

        @Override
        public Long getVersionNumber() {
            return this.versionNumber;
        }

        @Override
        public String getObjectId() {
            return this.objectId;
        }

        @Override
        public boolean isActive() {
            return this.active;
        }

        @Override
        public String getId() {
            return this.id;
        }

        public void setEntityAffiliation(EntityAffiliation.Builder entityAffiliation) {
FileProjectLine
org/kuali/rice/krad/bo/JpaToDdl.javaRice Implementation138
org/kuali/rice/krad/bo/JpaToOjbMetadata.javaRice Implementation129
			getClassFields( clazz.getSuperclass(), sb, overrides );
		}
	}

	private static void getReferences( Class<? extends Object> clazz, StringBuffer sb ) {
		for ( Field field : clazz.getDeclaredFields() ) {
			JoinColumns multiKey = (JoinColumns)field.getAnnotation( JoinColumns.class );
			JoinColumn singleKey = (JoinColumn)field.getAnnotation( JoinColumn.class );
			if ( multiKey != null || singleKey != null ) {
				List<JoinColumn> keys = new ArrayList<JoinColumn>();
				if ( singleKey != null ) {
					keys.add( singleKey );
				}
				if ( multiKey != null ) {
					for ( JoinColumn col : multiKey.value() ) {
						keys.add( col );
					}
				}
FileProjectLine
org/kuali/rice/kew/role/service/impl/RoleServiceImpl.javaRice Implementation105
org/kuali/rice/kew/role/service/impl/RoleServiceImpl.javaRice Implementation143
            deletePendingRoleRequests(routeHeader.getDocumentId(), roleName, null);
            for (Iterator nodeIt = nodeInstances.iterator(); nodeIt.hasNext();) {
                RouteNodeInstance nodeInstance = (RouteNodeInstance)nodeIt.next();
                RuleTemplate ruleTemplate = nodeInstance.getRouteNode().getRuleTemplate();
                FlexRM flexRM = new FlexRM();
        		RouteContext context = RouteContext.getCurrentRouteContext();
        		context.setDocument(routeHeader);
        		context.setNodeInstance(nodeInstance);
        		try {
        			List actionRequests = flexRM.getActionRequests(routeHeader, nodeInstance, ruleTemplate.getName());
        			for (Iterator iterator = actionRequests.iterator(); iterator.hasNext();) {
        				ActionRequestValue actionRequest = (ActionRequestValue) iterator.next();
        				if (roleName.equals(actionRequest.getRoleName())) {
FileProjectLine
org/kuali/rice/kew/actions/CancelAction.javaRice Implementation79
org/kuali/rice/kew/actions/DisapproveAction.javaRice Implementation94
    public boolean isActionCompatibleRequest(List requests) {
        // can always cancel saved or initiated document
        if (routeHeader.isStateInitiated() || routeHeader.isStateSaved()) {
            return true;
        }

        boolean actionCompatible = false;
        Iterator ars = requests.iterator();
        ActionRequestValue actionRequest = null;

        while (ars.hasNext()) {
            actionRequest = (ActionRequestValue) ars.next();
            String request = actionRequest.getActionRequested();

            // APPROVE request matches all but FYI and ACK
            if ( (KEWConstants.ACTION_REQUEST_APPROVE_REQ.equals(request)) ||
                 (KEWConstants.ACTION_REQUEST_COMPLETE_REQ.equals(request)) ) {
                actionCompatible = true;
                break;
            }
        }

        return actionCompatible;
    }

    /**
     * Records the disapprove action. - Checks to make sure the document status allows the action. - Checks that the user has not taken a previous action. - Deactivates the pending requests for this user - Records the action
     *
     * @throws InvalidActionTakenException
     */
    public void recordAction() throws InvalidActionTakenException {
        MDC.put("docId", getRouteHeader().getDocumentId());
        updateSearchableAttributesIfPossible();

        LOG.debug("Disapproving document : " + annotation);
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.javaRice Implementation102
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.javaRice Implementation378
        Vector fkFields = referenceDescriptor.getForeignKeyFields();
        Iterator fkIterator = fkFields.iterator();

        // walk through the list of the foreign keys, get their types
        while (fkIterator.hasNext()) {

            // get the field name of the fk & pk field
            String fkFieldName = (String) fkIterator.next();

            // get the value for the fk field
            Object fkFieldValue = null;
            try {
                fkFieldValue = PropertyUtils.getSimpleProperty(bo, fkFieldName);
            }

            // if we cant retrieve the field value, then
            // it doesnt have a value
            catch (IllegalAccessException e) {
                return false;
			} catch (InvocationTargetException e) {
                return false;
			} catch (NoSuchMethodException e) {
                return false;
            }

            // test the value
            if (fkFieldValue == null) {
                return false;
			} else if (String.class.isAssignableFrom(fkFieldValue.getClass())) {
                if (StringUtils.isBlank((String) fkFieldValue)) {
                    return false;
                }
            }
        }
        
        return allFkeysHaveValues;
    }

    /**
     * 
     * @see org.kuali.rice.krad.service.PersistenceService#refreshAllNonUpdatingReferences(org.kuali.rice.krad.bo.BusinessObject)
     */
    public void refreshAllNonUpdatingReferences(PersistableBusinessObject bo) {
FileProjectLine
org/kuali/rice/kew/docsearch/SearchableAttributeFloatValue.javaRice Implementation238
org/kuali/rice/kew/docsearch/SearchableAttributeLongValue.javaRice Implementation232
            if ( (lower != null) && (upper != null) ) {
                return (lower.compareTo(upper) <= 0);
            }
            return true;
        }
        return null;
    }

    public String getOjbConcreteClass() {
        return ojbConcreteClass;
    }

    public void setOjbConcreteClass(String ojbConcreteClass) {
        this.ojbConcreteClass = ojbConcreteClass;
    }

    public DocumentRouteHeaderValue getRouteHeader() {
        return routeHeader;
    }

    public void setRouteHeader(DocumentRouteHeaderValue routeHeader) {
        this.routeHeader = routeHeader;
    }

    public String getDocumentId() {
        return documentId;
    }

    public void setDocumentId(String documentId) {
        this.documentId = documentId;
    }

    public String getSearchableAttributeKey() {
        return searchableAttributeKey;
    }

    public void setSearchableAttributeKey(String searchableAttributeKey) {
        this.searchableAttributeKey = searchableAttributeKey;
    }

    public Long getSearchableAttributeValue() {
FileProjectLine
org/kuali/rice/kns/util/FieldUtils.javaRice KNS608
org/kuali/rice/kns/web/ui/SectionBridge.javaRice KNS696
         if ( field.getFieldType().equals(Field.KUALIUSER) ) {
             // this is supplemental, so catch and log any errors
             try {
                 if ( StringUtils.isNotBlank(field.getUniversalIdAttributeName()) ) {
                     Object principalId = ObjectUtils.getNestedValue(businessObject, field.getUniversalIdAttributeName());
                     if ( principalId != null ) {
                         field.setUniversalIdValue(principalId.toString());
                     }
                 }
                 if ( StringUtils.isNotBlank(field.getPersonNameAttributeName()) ) {
                     Object personName = ObjectUtils.getNestedValue(businessObject, field.getPersonNameAttributeName());
                     if ( personName != null ) {
                         field.setPersonNameValue( personName.toString() );
                     }
                 }
             } catch ( Exception ex ) {
                 LOG.warn( "Unable to get principal ID or person name property in SectionBridge.", ex );
FileProjectLine
org/kuali/rice/kew/api/extension/ExtensionDefinition.javaRice KEW API108
org/kuali/rice/kew/api/extension/ExtensionDefinition.javaRice KEW API198
            return new ExtensionDefinition(this);
        }

        @Override
        public String getId() {
            return this.id;
        }

        @Override
        public String getName() {
            return this.name;
        }

        @Override
        public String getApplicationId() {
            return this.applicationId;
        }

        @Override
        public String getLabel() {
            return this.label;
        }

        @Override
        public String getDescription() {
            return this.description;
        }

        @Override
        public String getType() {
            return this.type;
        }

        @Override
        public String getResourceDescriptor() {
            return this.resourceDescriptor;
        }

        @Override
        public Map<String, String> getConfiguration() {
            return this.configuration;
        }

        @Override
        public Long getVersionNumber() {
            return this.versionNumber;
        }

        public void setId(String id) {
FileProjectLine
org/kuali/rice/kim/impl/permission/PermissionInquirableImpl.javaRice Implementation83
org/kuali/rice/kim/impl/responsibility/ResponsibilityInquirableImpl.javaRice Implementation79
			return getInquiryUrlForPrimaryKeys(UberResponsibilityBo.class, businessObject, primaryKeys, null);
    	} else if(NAMESPACE_CODE.equals(attributeName) || TEMPLATE_NAMESPACE_CODE.equals(attributeName)){
			List<String> primaryKeys = new ArrayList<String>();
			primaryKeys.add("code");
			NamespaceBo parameterNamespace = new NamespaceBo();
			parameterNamespace.setCode((String)ObjectUtils.getPropertyValue(businessObject, attributeName));
			return getInquiryUrlForPrimaryKeys(NamespaceBo.class, parameterNamespace, primaryKeys, null);
        } else if(DETAIL_OBJECTS.equals(attributeName)){
        	//return getAttributesInquiryUrl(businessObject, DETAIL_OBJECTS);
        } else if(ASSIGNED_TO_ROLES.equals(attributeName)){
        	return getAssignedRoleInquiryUrl(businessObject);
        }

        return super.getInquiryUrl(businessObject, attributeName, forceInquiry);
    }
FileProjectLine
org/kuali/rice/kew/engine/node/IteratedRequestActivationNode.javaRice Implementation274
org/kuali/rice/kew/engine/node/RequestActivationNode.javaRice Implementation182
        if (LOG.isDebugEnabled()) {
                RouteNodeInstance nodeInstance = request.getNodeInstance();
            StringBuffer buffer = new StringBuffer();
            buffer.append("Processing AR: ").append(request.getActionRequestId()).append("\n");
            buffer.append("AR Node Name: ").append(nodeInstance != null ? nodeInstance.getName() : "null").append("\n");
            buffer.append("AR RouteLevel: ").append(request.getRouteLevel()).append("\n");
            buffer.append("AR Request Code: ").append(request.getActionRequested()).append("\n");
            buffer.append("AR Request priority: ").append(request.getPriority()).append("\n");
            LOG.debug(buffer);
FileProjectLine
org/kuali/rice/kew/api/doctype/RouteNode.javaRice KEW API161
org/kuali/rice/kew/api/doctype/RouteNode.javaRice KEW API310
        }

        @Override
        public String getRouteMethodName() {
            return this.routeMethodName;
        }

        @Override
        public String getRouteMethodCode() {
            return this.routeMethodCode;
        }

        @Override
        public boolean isFinalApproval() {
            return this.finalApproval;
        }

        @Override
        public boolean isMandatory() {
            return this.mandatory;
        }

        @Override
        public String getActivationType() {
            return this.activationType;
        }

        @Override
        public String getExceptionGroupId() {
            return this.exceptionGroupId;
        }

        @Override
        public String getType() {
            return this.type;
        }

        @Override
        public String getBranchName() {
            return this.branchName;
        }

        @Override
        public String getNextDocumentStatus() {
            return this.nextDocumentStatus;
        }

        @Override
        public List<RouteNodeConfigurationParameter.Builder> getConfigurationParameters() {
FileProjectLine
org/kuali/rice/kew/docsearch/StandardDocumentSearchResultProcessor.javaRice Implementation567
org/kuali/rice/kew/docsearch/StandardDocumentSearchResultProcessor.javaRice Implementation609
	public Map<String, Boolean> constructSortableByKey() {
		Map<String, Boolean> sortable = new HashMap<String, Boolean>();
		sortable
				.put(
						KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_DOCUMENT_ID,
						Boolean.TRUE);
		sortable
				.put(
						KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_DOC_TYPE_LABEL,
						Boolean.TRUE);
		sortable
				.put(
						KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_DOCUMENT_TITLE,
						Boolean.TRUE);
		sortable
				.put(
						KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_ROUTE_STATUS_DESC,
						Boolean.TRUE);
		sortable.put(
				KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_DOC_STATUS,
				Boolean.TRUE);
		sortable.put(
				KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_INITIATOR,
				Boolean.TRUE);
		sortable
				.put(
						KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_DATE_CREATED,
						Boolean.TRUE);
		sortable.put(
				KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_ROUTE_LOG,
				Boolean.FALSE);
		return sortable;
	}

	public Map<String, String> getLabelsByKey() {
FileProjectLine
org/kuali/rice/core/framework/persistence/jdbc/sql/SQLUtils.javaRice Core Framework201
org/kuali/rice/core/framework/persistence/jdbc/sql/SQLUtils.javaRice Core Framework221
            if (util.group(1).length() < 2) {
                monthBuf.append("0").append(util.group(1));
            } else {
                monthBuf.append(util.group(1));
            }

            if (util.group(2).length() < 2) {
                dateBuf.append("0").append(util.group(2));
            } else {
                dateBuf.append(util.group(2));
            }

            return new DateComponent(yearBuf.toString(), monthBuf.toString(), dateBuf.toString());

            // small date format yyyy/M/d | yyyy/MM/dd | yyyy-M-d | yyyy-MM-dd
        } else if (regexSplitExpression.equals(DATE_REGEX_SMALL_FOUR_DIGIT_YEAR_FIRST_SPLIT)) {
FileProjectLine
org/kuali/rice/krad/uif/service/impl/InquiryViewTypeServiceImpl.javaRice Implementation51
org/kuali/rice/krad/uif/service/impl/LookupViewTypeServiceImpl.javaRice Implementation51
		parameters.put(UifParameters.DATA_OBJECT_CLASS_NAME, lookupView.getDataObjectClassName().getName());

		return parameters;
	}

	/**
	 * @see org.kuali.rice.krad.uif.service.ViewTypeService#getParametersFromRequest(java.util.Map)
	 */
	public Map<String, String> getParametersFromRequest(Map<String, String> requestParameters) {
		Map<String, String> parameters = new HashMap<String, String>();

		if (requestParameters.containsKey(UifParameters.VIEW_NAME)) {
			parameters.put(UifParameters.VIEW_NAME, requestParameters.get(UifParameters.VIEW_NAME));
		}
		else {
			parameters.put(UifParameters.VIEW_NAME, UifConstants.DEFAULT_VIEW_NAME);
		}

		if (requestParameters.containsKey(UifParameters.DATA_OBJECT_CLASS_NAME)) {
			parameters.put(UifParameters.DATA_OBJECT_CLASS_NAME,
					requestParameters.get(UifParameters.DATA_OBJECT_CLASS_NAME));
		}
FileProjectLine
org/kuali/rice/kew/role/service/impl/ActionRequestDerivedRoleTypeServiceImpl.javaRice Implementation67
org/kuali/rice/krad/authorization/PermissionDerivedRoleTypeServiceImpl.javaRice Implementation79
                members.add(RoleMembership.Builder.create(null/*roleId*/, null, permissionAssigneeInfo.getGroupId(), Role.GROUP_MEMBER_TYPE, null).build());
            }
        }
        return members;
    }


    @Override
    public boolean hasApplicationRole(
            String principalId, List<String> groupIds, String namespaceCode, String roleName, Map<String, String> qualification){
        if (StringUtils.isBlank(principalId)) {
            throw new RiceIllegalArgumentException("principalId was null or blank");
        }

        if (groupIds == null) {
            throw new RiceIllegalArgumentException("groupIds was null or blank");
        }

        if (StringUtils.isBlank(namespaceCode)) {
            throw new RiceIllegalArgumentException("namespaceCode was null or blank");
        }

        if (StringUtils.isBlank(roleName)) {
            throw new RiceIllegalArgumentException("roleName was null or blank");
        }

        if (qualification == null) {
            throw new RiceIllegalArgumentException("qualification was null");
        }
FileProjectLine
org/kuali/rice/kns/util/FieldUtils.javaRice KNS969
org/kuali/rice/kns/util/FieldUtils.javaRice KNS989
                if (KRADConstants.MAINTENANCE_EDIT_ACTION.equals(maintenanceAction) || KRADConstants.MAINTENANCE_NEWWITHEXISTING_ACTION.equals(maintenanceAction)) {
                	// if there's existing data on the page that we're not going to clear out, then we will mask it out
                	if(fieldAuth.isPartiallyMasked()){
	                	field.setSecure(true);
	                	fieldAuth.setShouldBeEncrypted(true);
	                	MaskFormatter maskFormatter = fieldAuth.getMaskFormatter();
	                	String displayMaskValue = maskFormatter.maskValue(field.getPropertyValue());
	                	field.setDisplayMaskValue(displayMaskValue);
	                	populateSecureField(field, field.getPropertyValue());
                	}
	                else if(fieldAuth.isMasked()){
	                	field.setSecure(true);
	                	fieldAuth.setShouldBeEncrypted(true);
	                	MaskFormatter maskFormatter = fieldAuth.getMaskFormatter();
	                	String displayMaskValue = maskFormatter.maskValue(field.getPropertyValue());
	                	field.setDisplayMaskValue(displayMaskValue);
	                	populateSecureField(field, field.getPropertyValue());
	                }
                }
FileProjectLine
org/kuali/rice/kew/api/action/RoutingReportCriteria.javaRice KEW API99
org/kuali/rice/kew/api/action/RoutingReportCriteria.javaRice KEW API224
            return new RoutingReportCriteria(this);
        }

        @Override
        public String getDocumentId() {
            return this.documentId;
        }

        @Override
        public String getTargetNodeName() {
            return this.targetNodeName;
        }

        @Override
        public List<String> getTargetPrincipalIds() {
            return this.targetPrincipalIds;
        }

        @Override
        public String getRoutingPrincipalId() {
            return this.routingPrincipalId;
        }

        @Override
        public String getDocumentTypeName() {
            return this.documentTypeName;
        }

        @Override
        public String getXmlContent() {
            return this.xmlContent;
        }

        @Override
        public List<String> getRuleTemplateNames() {
            return this.ruleTemplateNames;
        }

        @Override
        public List<String> getNodeNames() {
            return this.nodeNames;
        }

        @Override
        public List<RoutingReportActionToTake.Builder> getActionsToTake() {
FileProjectLine
org/kuali/rice/kns/datadictionary/exporter/AttributesMapBuilder.javaRice Implementation137
org/kuali/rice/kns/datadictionary/exporter/AttributesMapBuilder.javaRice Implementation172
            controlMap.set("multiselect", "true");
            controlMap.set("valuesFinder", control.getValuesFinderClass());
            if (control.getBusinessObjectClass() != null) {
                controlMap.set("businessObject", control.getBusinessObjectClass());
            }
            if (StringUtils.isNotEmpty(control.getKeyAttribute())) {
                controlMap.set("keyAttribute", control.getKeyAttribute());
            }
            if (StringUtils.isNotEmpty(control.getLabelAttribute())) {
                controlMap.set("labelAttribute", control.getLabelAttribute());
            }
            if (control.getIncludeKeyInLabel() != null) {
                controlMap.set("includeKeyInLabel", control.getIncludeKeyInLabel().toString());
            }
FileProjectLine
org/kuali/rice/kns/util/WebUtils.javaRice KNS661
org/kuali/rice/krad/util/KRADUtils.javaRice KRAD Web Framework479
    }
    
    
    
    /**
     * Checks if the user is allowed to delete note attachment
     * 
     * @param document
     * @param attachmentTypeCode
     * @param authorUniversalIdentifier
     * @return boolean flag indicating if the delete is allowed
     */
    public static boolean canDeleteNoteAttachment(Document document, String attachmentTypeCode,
            String authorUniversalIdentifier) {
        boolean canDeleteNoteAttachment = false;
        DocumentAuthorizer documentAuthorizer = KRADServiceLocatorWeb.getDocumentHelperService().getDocumentAuthorizer(
                document);
        canDeleteNoteAttachment = documentAuthorizer.canDeleteNoteAttachment(document, attachmentTypeCode, "false",
                GlobalVariables.getUserSession().getPerson());
        if (canDeleteNoteAttachment) {
            return canDeleteNoteAttachment;
        }
        else {
            canDeleteNoteAttachment = documentAuthorizer.canDeleteNoteAttachment(document, attachmentTypeCode, "true",
                    GlobalVariables.getUserSession().getPerson());
            if (canDeleteNoteAttachment
                    && !authorUniversalIdentifier.equals(GlobalVariables.getUserSession().getPerson().getPrincipalId())) {
                canDeleteNoteAttachment = false;
            }
        }
        return canDeleteNoteAttachment;
    }    
FileProjectLine
org/kuali/rice/kew/api/document/node/RouteNodeInstance.javaRice KEW API143
org/kuali/rice/kew/api/document/node/RouteNodeInstance.javaRice KEW API265
        public List<RouteNodeInstanceState.Builder> getState() {
            return this.state;
        }

        @Override
        public String getDocumentId() {
            return this.documentId;
        }

        @Override
        public String getBranchId() {
            return this.branchId;
        }

        @Override
        public String getRouteNodeId() {
            return this.routeNodeId;
        }

        @Override
        public String getProcessId() {
            return this.processId;
        }

        @Override
        public boolean isActive() {
            return this.active;
        }

        @Override
        public boolean isComplete() {
            return this.complete;
        }

        @Override
        public boolean isInitial() {
            return this.initial;
        }

        @Override
        public String getId() {
            return this.id;
        }

        @Override
        public List<RouteNodeInstance.Builder> getNextNodeInstances() {
FileProjectLine
org/kuali/rice/krad/dao/BusinessObjectDao.javaRice Implementation154
org/kuali/rice/krad/service/BusinessObjectService.javaRice KRAD Application Framework131
    public <T extends BusinessObject> Collection<T> findMatching(Class<T> clazz, Map<String, ?> fieldValues);
    
    /**
     * Finds all entities matching the passed in Rice JPA criteria
     * 
     * @param <T> the type of the entity that will be returned
     * @param criteria the criteria to form the query with
     * @return a Collection (most likely a List) of all matching entities 
     */
    //public abstract <T extends BusinessObject> Collection<T> findMatching(Criteria criteria);

    /**
     * This method retrieves a count of the business objects populated with data which match the criteria in the given Map.
     * 
     * @param clazz
     * @param fieldValues
     * @return number of businessObjects of the given class whose fields match the values in the given expected-value Map
     */
    public int countMatching(Class clazz, Map<String, ?> fieldValues);

    /**
     * This method retrieves a count of the business objects populated with data which match both the positive criteria 
     * and the negative criteria in the given Map.
     * 
     * @param clazz
     * @param positiveFieldValues
     * @param negativeFieldValues
     * @return number of businessObjects of the given class whose fields match the values in the given expected-value Maps
     */
    public int countMatching(Class clazz, Map<String, ?> positiveFieldValues, Map<String, ?> negativeFieldValues);
    
    /**
     * This method retrieves a collection of business objects populated with data, such that each record in the database populates a
     * new object instance. This will retrieve business objects by class type and also by criteria passed in as key-value pairs,
     * specifically attribute name and its expected value. Performs an order by on sort field.
     * 
     * @param clazz
     * @param fieldValues
     * @return
     */
    public <T extends BusinessObject> Collection<T> findMatchingOrderBy(Class<T> clazz, Map<String, ?> fieldValues, String sortField, boolean sortAscending);

    /**
     * Deletes a business object from the database.
     * 
     * @param bo
     */
    public void delete(PersistableBusinessObject bo);

    /**
     * Deletes each business object in the given List.
     * 
     * @param boList
     */
    public void delete(List<? extends PersistableBusinessObject> boList);

    /**
     * Deletes the object(s) matching the given field values
     * 
     * @param clazz
     * @param fieldValues
     */
    public void deleteMatching(Class clazz, Map<String, ?> fieldValues);

    /**
     * 
     * This method attempts to retrieve the reference from a BO if it exists.
     * 
     * @param bo - populated BusinessObject instance that includes the referenceName property
     * @param referenceName - name of the member/property to load
     * @return A populated object from the DB, if it exists
     * 
     */
    public BusinessObject getReferenceIfExists(BusinessObject bo, String referenceName);
FileProjectLine
org/kuali/rice/kns/web/struts/action/KualiRequestProcessor.javaRice Implementation530
org/kuali/rice/kns/web/struts/action/KualiRequestProcessor.javaRice Implementation558
				if (form instanceof PojoForm) {
					if (((PojoForm)form).getEditableProperties() == null 
							|| ((PojoForm)form).getEditableProperties().isEmpty()) {
					    EditablePropertiesHistoryHolder holder = (EditablePropertiesHistoryHolder) GlobalVariables.getUserSession().getObjectMap().get(
                                KRADConstants.EDITABLE_PROPERTIES_HISTORY_HOLDER_ATTR_NAME);
				        if (holder == null) {
				    	    holder = new EditablePropertiesHistoryHolder();
				        }

					    final String guid = holder.addEditablePropertiesToHistory(((PojoForm)form).getEditableProperties());
				        ((PojoForm)form).setActionEditablePropertiesGuid(guid);
				        GlobalVariables.getUserSession().addObject(KRADConstants.EDITABLE_PROPERTIES_HISTORY_HOLDER_ATTR_NAME, holder);
					}
				}			
FileProjectLine
org/kuali/rice/kew/rule/web/WebRuleBaseValues.javaRice Implementation653
org/kuali/rice/kew/rule/web/WebRuleBaseValues.javaRice Implementation673
	public String getParentRuleId() {
		if (getDelegateRule().booleanValue()) {
			List ruleDelegations = getRuleDelegationService().findByDelegateRuleId(getRuleBaseValuesId());
			RuleDelegation currentRuleDelegation = (RuleDelegation) ruleDelegations.get(0);
			RuleBaseValues mostRecentRule = currentRuleDelegation.getRuleResponsibility().getRuleBaseValues();

			for (Iterator iter = ruleDelegations.iterator(); iter.hasNext();) {
				RuleDelegation ruleDelegation = (RuleDelegation) iter.next();
				RuleBaseValues parentRule = ruleDelegation.getRuleResponsibility().getRuleBaseValues();

				if (parentRule.getActivationDate().after(mostRecentRule.getActivationDate())) {
					mostRecentRule = ruleDelegation.getRuleResponsibility().getRuleBaseValues();
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation528
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.javaRice Implementation375
                    col.setColumnAnchor(getInquiryUrl(element, col.getPropertyName()));

                }
            }

            ResultRow row = new ResultRow(columns, returnUrl.constructCompleteHtmlTag(), actionUrls);
            row.setRowId(returnUrl.getName());
            row.setReturnUrlHtmlData(returnUrl);
            // because of concerns of the BO being cached in session on the ResultRow,
            // let's only attach it when needed (currently in the case of export)
            if (getBusinessObjectDictionaryService().isExportable(getBusinessObjectClass())) {
                row.setBusinessObject(element);
            }
            if(element instanceof PersistableBusinessObject){
                row.setObjectId((((PersistableBusinessObject)element).getObjectId()));
            }


            boolean rowReturnable = isResultReturnable(element);
            row.setRowReturnable(rowReturnable);
            if (rowReturnable) {
                hasReturnableRow = true;
            }
            resultTable.add(row);
        }

        lookupForm.setHasReturnableRow(hasReturnableRow);

        return displayList;
    }
FileProjectLine
org/kuali/rice/kew/document/RoutingRuleMaintainableBusRule.javaRice Implementation237
org/kuali/rice/kew/rule/web/WebRuleUtils.javaRice Implementation434
    	RuleTemplate ruleTemplate = KEWServiceLocator.getRuleTemplateService().findByRuleTemplateId(rule.getRuleTemplateId());

		/** Populate rule extension values * */
		List extensions = new ArrayList();
		for (Iterator iterator = ruleTemplate.getActiveRuleTemplateAttributes().iterator(); iterator.hasNext();) {
			RuleTemplateAttribute ruleTemplateAttribute = (RuleTemplateAttribute) iterator.next();
			if (!ruleTemplateAttribute.isWorkflowAttribute()) {
				continue;
			}
			WorkflowAttribute workflowAttribute = ruleTemplateAttribute.getWorkflowAttribute();

			RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
			if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) {
				((GenericXMLRuleAttribute) workflowAttribute).setRuleAttribute(ruleAttribute);
			}

			Map<String, String> parameterMap = getFieldMapForRuleTemplateAttribute(rule, ruleTemplateAttribute);
FileProjectLine
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.javaRice Implementation564
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.javaRice Implementation698
        return (OutboxItemActionListExtension)getPersistenceBrokerTemplate().getObjectByQuery(new QueryByCriteria(OutboxItemActionListExtension.class, crit));
    }

    private Date beginningOfDay(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        return cal.getTime();
    }

    private Date endOfDay(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.set(Calendar.HOUR_OF_DAY, 23);
        cal.set(Calendar.MINUTE, 59);
        cal.set(Calendar.SECOND, 59);
        return cal.getTime();
    }
FileProjectLine
org/kuali/rice/ken/web/spring/ContentTypeController.javaRice Implementation142
org/kuali/rice/ken/web/spring/ContentTypeController.javaRice Implementation181
   public ModelAndView updateContentType(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
       view = "ContentTypeManager";
       String id = request.getParameter("id");
       String name = request.getParameter("name");
       String description = request.getParameter("description");
       String namespace = request.getParameter("namespace");
       String xsd = request.getParameter("xsd");
       String xsl = request.getParameter("xsl");
       
       LOG.debug("id: "+id);
       LOG.debug("name: "+name);
       LOG.debug("description: "+description);
       LOG.debug("namespace: "+namespace);
       LOG.debug("xsd: "+xsd);
       LOG.debug("xsl: "+xsl);
       
       NotificationContentType notificationContentType = this.notificationContentTypeService.getNotificationContentType(name);
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.javaRice Core Framework453
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.javaRice Core Framework547
						}
						//descriptor.addFkField(entityDescriptor.getFieldByColumnName(jc.name()).getName());
						//descriptor.addFkField(entitesByClass.get(field.getType()).getFieldByColumnName(jc.name()).getName());
						descriptor.setInsertable(jc.insertable());
						descriptor.setUpdateable(jc.updatable());
					}
					if (field.isAnnotationPresent(JoinColumns.class)) {
						JoinColumns jcs = field.getAnnotation(JoinColumns.class);
						for (JoinColumn jc : jcs.value()) {
							descriptor.addJoinColumnDescriptor(constructJoinDescriptor(jc));
							descriptor.addFkField(entityDescriptor.getFieldByColumnName(jc.name()).getName());
							descriptor.setInsertable(jc.insertable());
							descriptor.setUpdateable(jc.updatable());
						} 
					}
					entityDescriptor.add(descriptor);
				}

				if (field.isAnnotationPresent(ManyToMany.class)) {
FileProjectLine
org/kuali/rice/kim/service/impl/IdentityManagementServiceImpl.javaRice Client Contrib416
org/kuali/rice/kim/service/impl/IdentityManagementServiceImpl.javaRice Client Contrib447
		sb.append( "Has Perm for " ).append( checkType ).append( ": " ).append( namespaceCode ).append( "/" ).append( permissionName ).append( '\n' );
		sb.append( "             Principal:  " ).append( principalId );
		if ( principalId != null ) {
			Principal principal = getPrincipal( principalId );
			if ( principal != null ) {
				sb.append( " (" ).append( principal.getPrincipalName() ).append( ')' );
			}
		}
		sb.append(  '\n' );
		sb.append( "             Details:\n" );
		if ( permissionDetails != null ) {
			sb.append( permissionDetails);
		} else {
			sb.append( "                         [null]\n" );
		}
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation312
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation189
    }

    public boolean createCriteria(Object example, String searchValue, String propertyName, Object criteria) {
    	return createCriteria( example, searchValue, propertyName, false, false, criteria );
    }
    
    public boolean createCriteria(Object example, String searchValue, String propertyName, boolean caseInsensitive, boolean treatWildcardsAndOperatorsAsLiteral, Object criteria) {
    	return createCriteria( example, searchValue, propertyName, false, false, criteria, null );
    }

    public boolean createCriteria(Object example, String searchValue, String propertyName, boolean caseInsensitive, boolean treatWildcardsAndOperatorsAsLiteral, Object criteria, Map searchValues) {
        // if searchValue is empty and the key is not a valid property ignore
        if (!(criteria instanceof Criteria) || StringUtils.isBlank(searchValue) || !ObjectUtils.isWriteable(example, propertyName, persistenceStructureService)) {
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation580
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.javaRice Implementation377
                }
            }

            ResultRow row = new ResultRow(columns, returnUrl.constructCompleteHtmlTag(), actionUrls);
            row.setRowId(returnUrl.getName());
            row.setReturnUrlHtmlData(returnUrl);
            // because of concerns of the BO being cached in session on the ResultRow,
            // let's only attach it when needed (currently in the case of export)
            if (getBusinessObjectDictionaryService().isExportable(getBusinessObjectClass())) {
                row.setBusinessObject(element);
            }
            if(element instanceof PersistableBusinessObject){
                row.setObjectId((((PersistableBusinessObject)element).getObjectId()));
            }


            boolean rowReturnable = isResultReturnable(element);
            row.setRowReturnable(rowReturnable);
            if (rowReturnable) {
                hasReturnableRow = true;
            }
            resultTable.add(row);
        }

        lookupForm.setHasReturnableRow(hasReturnableRow);

        return displayList;
    }
FileProjectLine
org/kuali/rice/kew/role/service/impl/ActionRequestDerivedRoleTypeServiceImpl.javaRice Implementation68
org/kuali/rice/kew/role/service/impl/RouteLogDerivedRoleTypeServiceImpl.javaRice Implementation90
			}
		}

		return members;
	}

	@Override
	public boolean hasApplicationRole(
			String principalId, List<String> groupIds, String namespaceCode, String roleName, Map<String, String> qualification){
		if (StringUtils.isBlank(principalId)) {
            throw new RiceIllegalArgumentException("principalId was null or blank");
        }

        if (groupIds == null) {
            throw new RiceIllegalArgumentException("groupIds was null or blank");
        }

        if (StringUtils.isBlank(namespaceCode)) {
            throw new RiceIllegalArgumentException("namespaceCode was null or blank");
        }

        if (StringUtils.isBlank(roleName)) {
            throw new RiceIllegalArgumentException("roleName was null or blank");
        }

        if (qualification == null) {
            throw new RiceIllegalArgumentException("qualification was null");
        }


        validateRequiredAttributesAgainstReceived(qualification);
FileProjectLine
org/kuali/rice/core/framework/persistence/platform/MySQLDatabasePlatform.javaRice Core Framework62
org/kuali/rice/core/framework/persistence/platform/OracleDatabasePlatform.javaRice Core Framework75
			statement = connection.prepareStatement("select " + sequenceName + ".nextval from dual");
			resultSet = statement.executeQuery();

			if (!resultSet.next()) {
				throw new RuntimeException("Error retrieving next option id for action list from sequence.");
			}
			return new Long(resultSet.getLong(1));
		} catch (SQLException e) {
			throw new RuntimeException("Error retrieving next option id for action list from sequence.", e);
		} catch (LookupException e) {
			throw new RuntimeException("Error retrieving next option id for action list from sequence.", e);
		} finally {
			if (statement != null) {
				try {
					statement.close();
				} catch (SQLException e) {
				}
			}
			if (resultSet != null) {
				try {
					resultSet.close();
				} catch (SQLException e) {
				}
			}
		}
	}

    public String getLockRouteHeaderQuerySQL(String documentId, boolean wait) {
FileProjectLine
org/kuali/rice/kim/api/common/template/Template.javaRice KIM API267
org/kuali/rice/kim/api/type/KimTypeAttribute.javaRice KIM API208
            return kimTypeId;
        }

        public void setKimTypeId(final String kimTypeId) {
            this.kimTypeId = kimTypeId;
        }

        @Override
        public boolean isActive() {
            return active;
        }

        public void setActive(final boolean active) {
            this.active = active;
        }

        @Override
        public Long getVersionNumber() {
            return versionNumber;
        }

        public void setVersionNumber(final Long versionNumber) {
            if (versionNumber == null || versionNumber <= 0) {
                throw new IllegalArgumentException("versionNumber is invalid");
            }

            this.versionNumber = versionNumber;
        }

        @Override
        public String getObjectId() {
            return objectId;
        }

        public void setObjectId(final String objectId) {
            this.objectId = objectId;
        }

        @Override
        public KimTypeAttribute build() {
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation295
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.javaRice Implementation312
                    for (WorkflowServiceErrorImpl wsei : (List<WorkflowServiceErrorImpl>)attribute.validateRuleData(fieldValues)) {
                        GlobalVariables.getMessageMap().putError(wsei.getMessage(), RiceKeyConstants.ERROR_CUSTOM, wsei.getArg1());
                    }
                   
					try {
						List<RuleExtension> curExts = ruleTemplateAttribute.getRuleExtensions();
		                for (Object element : curExts) {
		                	RuleExtension curExt = (RuleExtension) iter.next();
		                	curExtId = curExt.getRuleExtensionId();
		                	RuleBaseValues curRule = curExt.getRuleBaseValues();
							attribute.validateRuleData(WebRuleUtils.getFieldMapForRuleTemplateAttribute(curRule, ruleTemplateAttribute));
		                }
					} catch (Exception e) {						
						LOG.warn("Exception caught attempting to validate attribute data for extension id:" + curExtId + ". Reason: " + e.getCause());
					}
                 
                    searchRows = attribute.getRuleRows();
FileProjectLine
org/kuali/rice/edl/impl/components/GlobalAttributeComponent.javaRice EDL Impl74
org/kuali/rice/edl/impl/components/GlobalAttributeComponent.javaRice EDL Impl106
					for (int fIndex = 0; fIndex < fieldNodes.getLength(); fIndex++) {
						Element fieldElem = (Element)fieldNodes.item(fIndex);
						String edlField = fieldElem.getAttribute("edlField");
						String attributeField = fieldElem.getAttribute("attributeField");
						PropertyDefinition property = attributeDefBuilder.getPropertyDefinition(attributeField);
						String value = requestParser.getParameterValue(edlField);
						if (property == null) {
							property = PropertyDefinition.create(attributeField, value);							
						} else {
		                    // modify the current property
		                    attributeDefBuilder.getPropertyDefinitions().remove(property);
		                    property = PropertyDefinition.create(property.getName(), value);
						}
						attributeDefBuilder.addPropertyDefinition(property);
					}
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.javaRice Core Framework57
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.javaRice Core Framework70
			for (JoinColumnDescriptor joinColumnDescriptor : inverseJoinColumnDescriptors) {				
				sb.append(" jc = { ");
				sb.append("name:").append(joinColumnDescriptor.getName()).append(", ");
				sb.append("insertable:").append(joinColumnDescriptor.isInsertable()).append(", ");
				sb.append("nullable:").append(joinColumnDescriptor.isNullable()).append(", ");
				sb.append("unique:").append(joinColumnDescriptor.isUnique()).append(", ");
				sb.append("updateable:").append(joinColumnDescriptor.isUpdateable());
				sb.append(" }");
			}
			sb.append(" } ");
		}
FileProjectLine
org/kuali/rice/krad/datadictionary/validation/constraint/FloatingPointPatternConstraint.javaRice KRAD Web Framework44
org/kuali/rice/krad/datadictionary/validation/constraint/IntegerPatternConstraint.javaRice KRAD Web Framework43
        regex.append("[0-9]*");

        return regex.toString();
    }
    
    /**
     * @return the allowNegative
     */
    public boolean isAllowNegative() {
        return this.allowNegative;
    }

    /**
     * @param allowNegative the allowNegative to set
     */
    public void setAllowNegative(boolean allowNegative) {
        this.allowNegative = allowNegative;
    }
    
    /**
     * This overridden method ...
     * 
     * @see org.kuali.rice.krad.datadictionary.validation.constraint.ValidDataPatternConstraint#getValidationMessageParams()
     */
    @Override
    public List<String> getValidationMessageParams() {
        if (validationMessageParams == null) {
            validationMessageParams = new ArrayList<String>();
            ConfigurationService configService = KRADServiceLocator.getKualiConfigurationService();
            if (allowNegative) {
                validationMessageParams.add(configService
                        .getPropertyValueAsString(UifConstants.Messages.VALIDATION_MSG_KEY_PREFIX
                                + "positiveOrNegative"));
            } else {
                validationMessageParams.add(configService
                        .getPropertyValueAsString(UifConstants.Messages.VALIDATION_MSG_KEY_PREFIX + "positive"));
            }
        }
        return validationMessageParams;
    }
}
FileProjectLine
org/kuali/rice/kim/impl/role/RoleServiceImpl.javaRice KIM Impl140
org/kuali/rice/kim/impl/role/RoleServiceImpl.javaRice KIM Impl210
                if (roleTypeService != null) {
                    List<RoleMembership> las = roleIdToMembershipMap.get(roleMemberBo.getRoleId());
                    if (las == null) {
                        las = new ArrayList<RoleMembership>();
                        roleIdToMembershipMap.put(roleMemberBo.getRoleId(), las);
                    }
                    RoleMembership mi = RoleMembership.Builder.create(
                            roleMemberBo.getRoleId(),
                            roleMemberBo.getRoleMemberId(),
                            roleMemberBo.getMemberId(),
                            roleMemberBo.getMemberTypeCode(),
                            roleMemberBo.getAttributes()).build();

                    las.add(mi);
                } else {
                    results.add(roleMemberBo.getAttributes());
                }
            } else if (roleMemberBo.getMemberTypeCode().equals(Role.ROLE_MEMBER_TYPE)) {
FileProjectLine
org/kuali/rice/kim/impl/type/IdentityManagementTypeAttributeTransactionalDocument.javaRice Implementation83
org/kuali/rice/kim/impl/type/KimTypeAttributesHelper.javaRice Implementation88
	}
	
	public String getCommaDelimitedAttributesLabels(String commaDelimitedAttributesNamesList){
		String[] names = StringUtils.splitByWholeSeparator(commaDelimitedAttributesNamesList, KimConstants.KimUIConstants.COMMA_SEPARATOR);
		StringBuffer commaDelimitedAttributesLabels = new StringBuffer();
		for(String name: names){
			commaDelimitedAttributesLabels.append(getAttributeEntry().get(name.trim())+KimConstants.KimUIConstants.COMMA_SEPARATOR);
		}
        if(commaDelimitedAttributesLabels.toString().endsWith(KimConstants.KimUIConstants.COMMA_SEPARATOR))
        	commaDelimitedAttributesLabels.delete(commaDelimitedAttributesLabels.length()-KimConstants.KimUIConstants.COMMA_SEPARATOR.length(), commaDelimitedAttributesLabels.length());
        return commaDelimitedAttributesLabels.toString();
	}

	public KimAttributeField getAttributeDefinition(String attributeName){
FileProjectLine
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.javaRice Implementation342
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.javaRice Implementation278
    private Criteria getSearchCriteria(String docTypeName, String ruleTemplateId, String ruleDescription, Boolean activeInd, Map<String, String> extensionValues) {
        Criteria crit = new Criteria();
        crit.addEqualTo("currentInd", Boolean.TRUE);
        crit.addEqualTo("templateRuleInd", Boolean.FALSE);
        if (activeInd != null) {
            crit.addEqualTo("activeInd", activeInd);
        }
        if (docTypeName != null) {
            crit.addLike("UPPER(docTypeName)", docTypeName.toUpperCase());
        }
        if (ruleDescription != null && !ruleDescription.trim().equals("")) {
            crit.addLike("UPPER(description)", ruleDescription.toUpperCase());
        }
        if (ruleTemplateId != null) {
            crit.addEqualTo("ruleTemplateId", ruleTemplateId);
        }
        if (extensionValues != null && !extensionValues.isEmpty()) {
FileProjectLine
org/kuali/rice/kim/ldap/EntityDefaultMapper.javaRice LDAP Connector50
org/kuali/rice/kim/ldap/EntityMapper.javaRice LDAP Connector54
        person.setId(entityId);
        
        if (entityId == null) {
            throw new InvalidLdapEntityException("LDAP Search Results yielded an invalid result with attributes " 
                                                 + context.getAttributes());
        }
        
        person.setAffiliations(new ArrayList<EntityAffiliation.Builder>());
        person.setExternalIdentifiers(new ArrayList<EntityExternalIdentifier.Builder>());
        
        final EntityExternalIdentifier.Builder externalId = EntityExternalIdentifier.Builder.create();
        externalId.setExternalIdentifierTypeCode(getConstants().getTaxExternalIdTypeCode());
        externalId.setExternalId(entityId);
        person.getExternalIdentifiers().add(externalId);
        
        person.setAffiliations((List<EntityAffiliation.Builder>) getAffiliationMapper().mapFromContext(context));
        
        person.setEntityTypes(new ArrayList<EntityTypeContactInfo.Builder>());
FileProjectLine
org/kuali/rice/ksb/api/registry/ServiceInfo.javaRice KSB API124
org/kuali/rice/ksb/api/registry/ServiceInfo.javaRice KSB API238
            return new ServiceInfo(this);
        }

        @Override
        public String getServiceId() {
            return this.serviceId;
        }

        @Override
        public QName getServiceName() {
            return this.serviceName;
        }

        @Override
        public String getEndpointUrl() {
            return this.endpointUrl;
        }
        
        @Override
        public String getInstanceId() {
            return this.instanceId;
        }

        @Override
        public String getApplicationId() {
            return this.applicationId;
        }

        @Override
        public String getServerIpAddress() {
            return this.serverIpAddress;
        }
        
        @Override
        public String getType() {
        	return this.type;
        }
        
        @Override
        public String getServiceVersion() {
        	return this.serviceVersion;
        }

        @Override
        public ServiceEndpointStatus getStatus() {
        	return this.status;
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation438
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation336
        		propertyValue = propertyValue.toUpperCase();
        	}
            if (!treatWildcardsAndOperatorsAsLiteral && StringUtils.contains(propertyValue, SearchOperator.NOT.op())) {
                addNotCriteria(propertyName, propertyValue, propertyType, caseInsensitive, criteria);
            } else if (
            		!treatWildcardsAndOperatorsAsLiteral && propertyValue != null && (
            				StringUtils.contains(propertyValue, SearchOperator.BETWEEN.op())
            				|| propertyValue.startsWith(">")
            				|| propertyValue.startsWith("<") ) ) {
                addStringRangeCriteria(propertyName, propertyValue, criteria);
            } else {
            	if (treatWildcardsAndOperatorsAsLiteral) {
            		propertyValue = StringUtils.replace(propertyValue, "*", "\\*");
            	}
            	criteria.addLike(propertyName, propertyValue);
FileProjectLine
org/kuali/rice/kim/ldap/EntityTypeContactInfoDefaultMapper.javaRice LDAP Connector53
org/kuali/rice/kim/ldap/EntityTypeContactInfoMapper.javaRice LDAP Connector64
    }
    
    /**
     * Gets the value of constants
     *
     * @return the value of constants
     */
    public final Constants getConstants() {
        return this.constants;
    }

    /**
     * Sets the value of constants
     *
     * @param argConstants Value to assign to this.constants
     */
    public final void setConstants(final Constants argConstants) {
        this.constants = argConstants;
    }

    /**
     * Gets the value of addressMapper
     *
     * @return the value of addressMapper
     */
    public final EntityAddressMapper getAddressMapper() {
        return this.addressMapper;
    }

    /**
     * Sets the value of addressMapper
     *
     * @param argAddressMapper Value to assign to this.addressMapper
     */
    public final void setAddressMapper(final EntityAddressMapper argAddressMapper) {
        this.addressMapper = argAddressMapper;
    }

    /**
     * Gets the value of phoneMapper
     *
     * @return the value of phoneMapper
     */
    public final EntityPhoneMapper getPhoneMapper() {
        return this.phoneMapper;
    }

    /**
     * Sets the value of phoneMapper
     *
     * @param argPhoneMapper Value to assign to this.phoneMapper
     */
    public final void setPhoneMapper(final EntityPhoneMapper argPhoneMapper) {
        this.phoneMapper = argPhoneMapper;
    }

    /**
     * Gets the value of emailMapper
     *
     * @return the value of emailMapper
     */
    public final EntityEmailMapper getEmailMapper() {
        return this.emailMapper;
    }

    /**
     * Sets the value of emailMapper
     *
     * @param argEmailMapper Value to assign to this.emailMapper
     */
    public final void setEmailMapper(final EntityEmailMapper argEmailMapper) {
        this.emailMapper = argEmailMapper;
    }
}
FileProjectLine
org/kuali/rice/krad/util/documentserializer/DocumentSerializationState.javaRice KRAD Web Framework50
org/kuali/rice/krad/util/documentserializer/SerializationState.javaRice KRAD Web Framework51
    public SerializationState(){
        pathElements = new ArrayList<SerializationPropertyElement>();
    }
    
    /**
     * The number of property elements in this state object.
     * 
     * @return
     */
    public int numPropertyElements() {
        return pathElements.size();
    }
    
    /**
     * Adds an additional state element into this object.
     * 
     * @param elementName
     * @param propertyType the type of the property when it was serialized
     */
    public void addSerializedProperty(String elementName, PropertyType propertyType) {
        SerializationPropertyElement serializationPropertyElement = new SerializationPropertyElement(elementName, propertyType);
        pathElements.add(serializationPropertyElement);
    }
    
    /**
     * Removes the last added serialized property
     * 
     */
    public void removeSerializedProperty() {
        pathElements.remove(pathElements.size() - 1);
    }
    
    /**
     * Retrieves the element name of the state element.  A parameter value of 0 represents the first element that was added
     * by calling {@link #addSerializedProperty(String, PropertyType)} that hasn't been removed, and a value of 
     * {@link #numPropertyElements()} - 1 represents the element last added that hasn't been removed. 
     * 
     * @param propertyIndex most be between 0 and the value returned by {@link #numPropertyElements()} - 1
     * @return
     */
    public String getElementName(int propertyIndex) {
        return pathElements.get(propertyIndex).getElementName();
    }
    
    /**
     * Retrieves the property type of the state element.  A parameter value of 0 represents the first element that was added
     * by calling {@link #addSerializedProperty(String, PropertyType)} that hasn't been removed, and a value of 
     * {@link #numPropertyElements()} - 1 represents the element last added that hasn't been removed.
     * 
     * @param propertyIndex most be between 0 and the value returned by {@link #numPropertyElements()} - 1
     * @return
     */
    public PropertyType getPropertyType(int propertyIndex) {
        return pathElements.get(propertyIndex).getPropertyType();
    }
}
FileProjectLine
org/kuali/rice/kim/api/identity/email/EntityEmail.javaRice KIM API238
org/kuali/rice/kim/api/identity/phone/EntityPhone.javaRice KIM API358
        }

        @Override
        public boolean isDefaultValue() {
            return this.defaultValue;
        }

        @Override
        public Long getVersionNumber() {
            return this.versionNumber;
        }

        @Override
        public String getObjectId() {
            return this.objectId;
        }

        @Override
        public boolean isActive() {
            return this.active;
        }

        public void setId(String id) {
            if (StringUtils.isWhitespace(id)) {
                throw new IllegalArgumentException("id is blank");
            }
            this.id = id;
        }

        public void setEntityTypeCode(String entityTypeCode) {
            this.entityTypeCode = entityTypeCode;
        }

        public void setEntityId(String entityId) {
            this.entityId = entityId;
        }

        public void setPhoneType(Type.Builder phoneType) {
FileProjectLine
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation432
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.javaRice Implementation1980
						if(origAttributeId!=null && StringUtils.equals(origAttributeId, memberRoleQualifier.getKimAttribute().getId())){
							pndMemberRoleQualifier = new RoleDocumentDelegationMemberQualifier();
							pndMemberRoleQualifier.setAttrDataId(memberRoleQualifier.getId());
							pndMemberRoleQualifier.setAttrVal(memberRoleQualifier.getAttributeValue());
							pndMemberRoleQualifier.setDelegationMemberId(memberRoleQualifier.getAssignedToId());
							pndMemberRoleQualifier.setKimTypId(memberRoleQualifier.getKimTypeId());
							pndMemberRoleQualifier.setKimAttrDefnId(memberRoleQualifier.getKimAttributeId());
							pndMemberRoleQualifier.setKimAttribute(memberRoleQualifier.getKimAttribute());
							pndMemberRoleQualifiers.add(pndMemberRoleQualifier);
							attributePresent = true;
						}
					}
				}
				if(!attributePresent){
					pndMemberRoleQualifier = new RoleDocumentDelegationMemberQualifier();
					pndMemberRoleQualifier.setKimAttrDefnId(origAttributeId);
FileProjectLine
org/kuali/rice/kew/role/service/impl/RouteLogDerivedRoleTypeServiceImpl.javaRice Implementation90
org/kuali/rice/krad/authorization/PermissionDerivedRoleTypeServiceImpl.javaRice Implementation80
            }
        }
        return members;
    }


    @Override
    public boolean hasApplicationRole(
            String principalId, List<String> groupIds, String namespaceCode, String roleName, Map<String, String> qualification){
        if (StringUtils.isBlank(principalId)) {
            throw new RiceIllegalArgumentException("principalId was null or blank");
        }

        if (groupIds == null) {
            throw new RiceIllegalArgumentException("groupIds was null or blank");
        }

        if (StringUtils.isBlank(namespaceCode)) {
            throw new RiceIllegalArgumentException("namespaceCode was null or blank");
        }

        if (StringUtils.isBlank(roleName)) {
            throw new RiceIllegalArgumentException("roleName was null or blank");
        }

        if (qualification == null) {
            throw new RiceIllegalArgumentException("qualification was null");
        }
FileProjectLine
org/kuali/rice/core/framework/persistence/jdbc/sql/SqlBuilder.javaRice Core Framework254
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation551
	private BigDecimal cleanNumeric(String value) {
		String cleanedValue = value.replaceAll("[^-0-9.]", "");
		// ensure only one "minus" at the beginning, if any
		if (cleanedValue.lastIndexOf('-') > 0) {
			if (cleanedValue.charAt(0) == '-') {
				cleanedValue = "-" + cleanedValue.replaceAll("-", "");
			} else {
				cleanedValue = cleanedValue.replaceAll("-", "");
			}
		}
		// ensure only one decimal in the string
		int decimalLoc = cleanedValue.lastIndexOf('.');
		if (cleanedValue.indexOf('.') != decimalLoc) {
			cleanedValue = cleanedValue.substring(0, decimalLoc).replaceAll("\\.", "") + cleanedValue.substring(decimalLoc);
		}
FileProjectLine
org/kuali/rice/core/api/uif/RemotableAttributeLookupSettings.javaRice Core API89
org/kuali/rice/core/api/uif/RemotableAttributeLookupSettings.javaRice Core API173
            return new RemotableAttributeLookupSettings(this);
        }

        @Override
        public boolean isInCriteria() {
            return inCriteria;
        }

        @Override
        public boolean isInResults() {
            return inResults;
        }

        @Override
        public boolean isRanged() {
            return ranged;
        }

        @Override
        public String getLowerBoundName() {
            return this.lowerBoundName;
        }

        @Override
        public String getLowerBoundLabel() {
            return this.lowerBoundLabel;
        }

        @Override
        public boolean isLowerBoundInclusive() {
            return this.lowerBoundInclusive;
        }

        @Override
        public String getUpperBoundName() {
            return this.upperBoundName;
        }

        @Override
        public String getUpperBoundLabel() {
            return this.upperBoundLabel;
        }

        @Override
        public boolean isUpperBoundInclusive() {
            return this.upperBoundInclusive;
        }

        public void setInCriteria(boolean inCriteria) {
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceServiceImpl.javaRice Implementation89
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.javaRice Implementation168
    }

    /**
	 * @see org.kuali.rice.krad.service.PersistenceService#retrieveReferenceObject(java.lang.Object,
	 *      String referenceObjectName)
     */
    public void retrieveReferenceObjects(List persistableObjects, List referenceObjectNames) {
        if (persistableObjects == null) {
            throw new IllegalArgumentException("invalid (null) persistableObjects");
        }
        if (persistableObjects.isEmpty()) {
            throw new IllegalArgumentException("invalid (empty) persistableObjects");
        }
        if (referenceObjectNames == null) {
            throw new IllegalArgumentException("invalid (null) referenceObjectNames");
        }
        if (referenceObjectNames.isEmpty()) {
            throw new IllegalArgumentException("invalid (empty) referenceObjectNames");
        }

        for (Iterator i = persistableObjects.iterator(); i.hasNext();) {
            Object persistableObject = i.next();
            retrieveReferenceObjects(persistableObject, referenceObjectNames);
        }
    }


    /**
     * @see org.kuali.rice.krad.service.PersistenceService#getFlattenedPrimaryKeyFieldValues(java.lang.Object)
     */
    public String getFlattenedPrimaryKeyFieldValues(Object persistableObject) {
FileProjectLine
org/kuali/rice/krad/document/authorization/MaintenanceDocumentAuthorizerBase.javaRice Implementation42
org/kuali/rice/krad/uif/authorization/MaintenanceDocumentAuthorizerBase.javaRice KRAD Web Framework39
                KRADServiceLocatorWeb.getDocumentDictionaryService().getMaintenanceDocumentTypeName(boClass));
		permissionDetails.put(KRADConstants.MAINTENANCE_ACTN,
				KRADConstants.MAINTENANCE_NEW_ACTION);
		return !permissionExistsByTemplate(KRADConstants.KRAD_NAMESPACE,
				KimConstants.PermissionTemplateNames.CREATE_MAINTAIN_RECORDS,
				permissionDetails)
				|| getPermissionService()
						.isAuthorizedByTemplateName(
								user.getPrincipalId(),
								KRADConstants.KRAD_NAMESPACE,
								KimConstants.PermissionTemplateNames.CREATE_MAINTAIN_RECORDS,
								permissionDetails, new HashMap<String, String>());
	}

    public final boolean canMaintain(Object dataObject, Person user) {
        Map<String, String> permissionDetails = new HashMap<String, String>(2);
        permissionDetails.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME,
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation357
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation279
	    	Criteria criteria = new Criteria();
	
	    	// iterate through the parameter map for key values search criteria
	    	Iterator propsIter = formProps.keySet().iterator();
	    	while (propsIter.hasNext()) {
	    		String propertyName = (String) propsIter.next();
	    		String searchValue = "";
	    		if (formProps.get(propertyName) != null) {
	    			searchValue = (formProps.get(propertyName)).toString();
	    		}
	
	    		if (StringUtils.isNotBlank(searchValue) & PropertyUtils.isWriteable(example, propertyName)) {
	    			Class propertyType = ObjectUtils.getPropertyType(example, propertyName, persistenceStructureService);
	    			if (TypeUtils.isIntegralClass(propertyType) || TypeUtils.isDecimalClass(propertyType) ) {
FileProjectLine
org/kuali/rice/kns/web/struts/action/KualiDocumentActionBase.javaRice KNS364
org/kuali/rice/krad/web/controller/DocumentControllerBase.javaRice KRAD Web Framework153
		String docId = form.getDocId();

		Document doc = null;
		doc = getDocumentService().getByDocumentHeaderId(docId);
		if (doc == null) {
			throw new UnknownDocumentIdException(
					"Document no longer exists.  It may have been cancelled before being saved.");
		}

		WorkflowDocument workflowDocument = doc.getDocumentHeader().getWorkflowDocument();
		if (!getDocumentHelperService().getDocumentAuthorizer(doc).canOpen(doc,
				GlobalVariables.getUserSession().getPerson())) {
			throw buildAuthorizationException("open", doc);
		}

		// re-retrieve the document using the current user's session - remove
		// the system user from the WorkflowDcument object
		if (workflowDocument != doc.getDocumentHeader().getWorkflowDocument()) {
			LOG.warn("Workflow document changed via canOpen check");
			doc.getDocumentHeader().setWorkflowDocument(workflowDocument);
		}
FileProjectLine
org/kuali/rice/core/web/parameter/ParameterLookupableHelperServiceImpl.javaRice Core Web64
org/kuali/rice/core/web/parameter/ParameterRule.javaRice Core Web67
	        Map<String, String> permissionDetails = new HashMap<String, String>();
	        permissionDetails.put(KimConstants.AttributeConstants.NAMESPACE_CODE, parm.getNamespaceCode());
	        permissionDetails.put(KimConstants.AttributeConstants.COMPONENT_NAME, parm.getComponentCode());
	        permissionDetails.put(KimConstants.AttributeConstants.PARAMETER_NAME, parm.getName());
	        allowsEdit = KimApiServiceLocator.getPermissionService().isAuthorizedByTemplateName(
	        				GlobalVariables.getUserSession().getPerson().getPrincipalId(),
	        				KRADConstants.KRAD_NAMESPACE,
	        				KimConstants.PermissionTemplateNames.MAINTAIN_SYSTEM_PARAMETER,
	        				permissionDetails, Collections.<String, String>emptyMap());
FileProjectLine
org/kuali/rice/krms/impl/ui/AgendaEditorController.javaRice KRMS Impl594
org/kuali/rice/krms/impl/ui/RuleEditorController.javaRice KRMS Impl650
        String selectedItemId = request.getParameter(AGENDA_ITEM_SELECTED);
        AgendaItemBo node = getAgendaItemById(firstItem, selectedItemId);
        AgendaItemBo parent = getParent(firstItem, selectedItemId);

        if (parent != null) {
            AgendaItemInstanceChildAccessor accessorToSelectedNode = getInstanceAccessorToChild(parent, node.getId());
            accessorToSelectedNode.setChild(node.getAlways());

            AgendaItemChildAccessor.always.setChild(node, parent.getAlways());
            AgendaItemChildAccessor.always.setChild(parent, node);
        }
    }


    @RequestMapping(params = "methodToCall=" + "moveRight")
    public ModelAndView moveRight(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        moveSelectedSubtreeRight(form, request);
FileProjectLine
org/kuali/rice/krad/document/authorization/DocumentAuthorizerBase.javaRice KRAD Web Framework171
org/kuali/rice/krad/uif/authorization/DocumentAuthorizerBase.javaRice KRAD Web Framework154
				user.getPrincipalId(), additionalPermissionDetails, null );
	}

	public final boolean canOpen(Document document, Person user) {
		return isAuthorizedByTemplate(document, KRADConstants.KRAD_NAMESPACE,
				KimConstants.PermissionTemplateNames.OPEN_DOCUMENT, user
						.getPrincipalId());
	}

	public final boolean canAddNoteAttachment(Document document,
			String attachmentTypeCode, Person user) {
		Map<String, String> additionalPermissionDetails = new HashMap<String, String>();
		if (attachmentTypeCode != null) {
			additionalPermissionDetails.put(KimConstants.AttributeConstants.ATTACHMENT_TYPE_CODE,
					attachmentTypeCode);
		}
		return isAuthorizedByTemplate(document, KRADConstants.KRAD_NAMESPACE,
				KimConstants.PermissionTemplateNames.ADD_NOTE_ATTACHMENT, user
						.getPrincipalId(), additionalPermissionDetails, null);
FileProjectLine
org/kuali/rice/krad/bo/authorization/BusinessObjectAuthorizerBase.javaRice KRAD Web Framework243
org/kuali/rice/krad/uif/authorization/AuthorizerBase.javaRice KRAD Web Framework225
        addPermissionDetails(primaryDataObjectOrDocument, permissionDetails);

        return permissionDetails;
    }

    protected static final PermissionService getPermissionService() {
        if (permissionService == null) {
            permissionService = KimApiServiceLocator.getPermissionService();
        }
        return permissionService;
    }

    protected static final PersonService getPersonService() {
        if (personService == null) {
            personService = KimApiServiceLocator.getPersonService();
        }
        return personService;
    }

    protected static final KualiModuleService getKualiModuleService() {
        if (kualiModuleService == null) {
            kualiModuleService = KRADServiceLocatorWeb.getKualiModuleService();
        }
        return kualiModuleService;
    }

    protected static final DataDictionaryService getDataDictionaryService() {
        if (dataDictionaryService == null) {
            dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService();
        }
        return dataDictionaryService;
    }

}
FileProjectLine
org/kuali/rice/kns/maintenance/KualiMaintainableImpl.javaRice KNS1363
org/kuali/rice/kns/util/FieldUtils.javaRice KNS773
                        errorMap.putError(propertyNamePrefix + propertyName, e.getErrorKey(), e.getErrorArgs());
                    }
                }
            }
        }
        catch (IllegalAccessException e) {
            LOG.error("unable to populate business object" + e.getMessage());
            throw new RuntimeException(e.getMessage(), e);
        }
        catch (InvocationTargetException e) {
            LOG.error("unable to populate business object" + e.getMessage());
            throw new RuntimeException(e.getMessage(), e);
        }
        catch (NoSuchMethodException e) {
            LOG.error("unable to populate business object" + e.getMessage());
            throw new RuntimeException(e.getMessage(), e);
        }
FileProjectLine
org/kuali/rice/krad/uif/service/impl/InquiryViewTypeServiceImpl.javaRice Implementation59
org/kuali/rice/krad/uif/service/impl/MaintenanceViewTypeServiceImpl.javaRice Implementation77
	public Map<String, String> getParametersFromRequest(Map<String, String> requestParameters) {
		Map<String, String> parameters = new HashMap<String, String>();

		if (requestParameters.containsKey(UifParameters.VIEW_NAME)) {
			parameters.put(UifParameters.VIEW_NAME, requestParameters.get(UifParameters.VIEW_NAME));
		}
		else {
			parameters.put(UifParameters.VIEW_NAME, UifConstants.DEFAULT_VIEW_NAME);
		}

		if (requestParameters.containsKey(UifParameters.DATA_OBJECT_CLASS_NAME)) {
			parameters.put(UifParameters.DATA_OBJECT_CLASS_NAME,
					requestParameters.get(UifParameters.DATA_OBJECT_CLASS_NAME));
		}
		else if (requestParameters.containsKey(KRADPropertyConstants.DOC_ID)) {
FileProjectLine
org/kuali/rice/kew/bo/lookup/DocSearchCriteriaDTOLookupableHelperServiceImpl.javaRice Implementation140
org/kuali/rice/kew/bo/lookup/DocSearchCriteriaDTOLookupableHelperServiceImpl.javaRice Implementation735
        	docSearchService.validateDocumentSearchCriteria(generator, criteria);
		} catch (WorkflowServiceErrorException wsee) {
			for (WorkflowServiceError workflowServiceError : (List<WorkflowServiceError>)wsee.getServiceErrors()) {
				if(workflowServiceError.getMessageMap() != null && workflowServiceError.getMessageMap().hasErrors()){
					// merge the message maps
					GlobalVariables.getMessageMap().merge(workflowServiceError.getMessageMap());
				}else{
					//TODO: can we add something to this to get it to highlight the right field too?  Maybe in arg1
					GlobalVariables.getMessageMap().putError(workflowServiceError.getMessage(), RiceKeyConstants.ERROR_CUSTOM, workflowServiceError.getMessage());
				}
			};
		}
        if(!GlobalVariables.getMessageMap().hasNoErrors()) {
        	throw new ValidationException("errors in search criteria");
FileProjectLine
org/kuali/rice/kew/actions/ApproveAction.javaRice Implementation157
org/kuali/rice/kew/actions/CompleteAction.javaRice Implementation151
        ActionTakenValue actionTaken = saveActionTaken(findDelegatorForActionRequests(actionRequests));

        LOG.debug("Deactivate all pending action requests");
        getActionRequestService().deactivateRequests(actionTaken, actionRequests);
        notifyActionTaken(actionTaken);

        boolean isException = getRouteHeader().isInException();
        boolean isSaved = getRouteHeader().isStateSaved();
        if (isException || isSaved) {
            String oldStatus = getRouteHeader().getDocRouteStatus();
            LOG.debug("Moving document back to Enroute from "+KEWConstants.DOCUMENT_STATUSES.get(oldStatus));
            getRouteHeader().markDocumentEnroute();
            String newStatus = getRouteHeader().getDocRouteStatus();
            notifyStatusChange(newStatus, oldStatus);
            KEWServiceLocator.getRouteHeaderService().saveRouteHeader(getRouteHeader());
        }
    }

}
FileProjectLine
org/kuali/rice/kim/api/role/PassThruRoleTypeServiceBase.javaRice Client Contrib63
org/kuali/rice/krad/authorization/PermissionDerivedRoleTypeServiceImpl.javaRice Implementation83
    }


    @Override
    public boolean hasApplicationRole(
            String principalId, List<String> groupIds, String namespaceCode, String roleName, Map<String, String> qualification){
        if (StringUtils.isBlank(principalId)) {
            throw new RiceIllegalArgumentException("principalId was null or blank");
        }

        if (groupIds == null) {
            throw new RiceIllegalArgumentException("groupIds was null or blank");
        }

        if (StringUtils.isBlank(namespaceCode)) {
            throw new RiceIllegalArgumentException("namespaceCode was null or blank");
        }

        if (StringUtils.isBlank(roleName)) {
            throw new RiceIllegalArgumentException("roleName was null or blank");
        }

        if (qualification == null) {
            throw new RiceIllegalArgumentException("qualification was null");
        }

        // FIXME: dangerous - data changes could cause an infinite loop - should add thread-local to trap state and abort
        return getPermissionService().isAuthorizedByTemplateName(principalId, permissionTemplateNamespace, permissionTemplateName, new HashMap<String, String>(qualification), new HashMap<String, String>(qualification));
FileProjectLine
org/kuali/rice/krad/uif/service/impl/LookupViewTypeServiceImpl.javaRice Implementation59
org/kuali/rice/krad/uif/service/impl/MaintenanceViewTypeServiceImpl.javaRice Implementation77
	public Map<String, String> getParametersFromRequest(Map<String, String> requestParameters) {
		Map<String, String> parameters = new HashMap<String, String>();

		if (requestParameters.containsKey(UifParameters.VIEW_NAME)) {
			parameters.put(UifParameters.VIEW_NAME, requestParameters.get(UifParameters.VIEW_NAME));
		}
		else {
			parameters.put(UifParameters.VIEW_NAME, UifConstants.DEFAULT_VIEW_NAME);
		}

		if (requestParameters.containsKey(UifParameters.DATA_OBJECT_CLASS_NAME)) {
			parameters.put(UifParameters.DATA_OBJECT_CLASS_NAME,
					requestParameters.get(UifParameters.DATA_OBJECT_CLASS_NAME));
		}
FileProjectLine
org/kuali/rice/kim/api/role/PassThruRoleTypeServiceBase.javaRice Client Contrib63
org/kuali/rice/kew/role/service/impl/ActionRequestDerivedRoleTypeServiceImpl.javaRice Implementation71
	}
	
	@Override
	public boolean hasApplicationRole(String principalId, List<String> groupIds, String namespaceCode, String roleName, Map<String, String> qualification) {
        if (StringUtils.isBlank(principalId)) {
            throw new RiceIllegalArgumentException("principalId was null or blank");
        }

        if (groupIds == null) {
            throw new RiceIllegalArgumentException("groupIds was null or blank");
        }

        if (StringUtils.isBlank(namespaceCode)) {
            throw new RiceIllegalArgumentException("namespaceCode was null or blank");
        }

        if (StringUtils.isBlank(roleName)) {
            throw new RiceIllegalArgumentException("roleName was null or blank");
        }

        if (qualification == null) {
            throw new RiceIllegalArgumentException("qualification was null");
        }
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation284
org/kuali/rice/krad/util/ObjectUtils.javaRice KRAD Web Framework1093
                    Object i = null;

                    // If the next level is a Collection, look into the collection, to find out what type its elements are.
                    if (Collection.class.isAssignableFrom(c)) {
                        Map<String, Class> m = persistenceStructureService.listCollectionObjectTypes(o.getClass());
                        c = m.get(parts[0]);
                    }

                    // Look into the attribute class to see if it is writeable.
                    try {
                        i = c.newInstance();

                        StringBuffer sb = new StringBuffer();
                        for (int x = 1; x < parts.length; x++) {
                            sb.append(1 == x ? "" : ".").append(parts[x]);
                        }
                        b = isWriteable(i, sb.toString(), persistenceStructureService);
FileProjectLine
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.javaRice Implementation87
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.javaRice Implementation118
            Map extensionValues, Collection actionRequestCodes) {
        Criteria crit = new Criteria();
        
        if (StringUtils.isNotBlank(delegationType) && !delegationType.equals(KEWConstants.DELEGATION_BOTH)) {
        	crit.addEqualTo("delegationType", delegationType);
        }
        
        if (StringUtils.isNotBlank(parentRuleBaseVaueId) && StringUtils.isNumeric(parentRuleBaseVaueId)) {
            crit.addIn("responsibilityId", this.getRuleResponsibilitySubQuery(new Long(parentRuleBaseVaueId)));
        }

        if (StringUtils.isNotBlank(parentResponsibilityId) && StringUtils.isNumeric(parentResponsibilityId)) {
            crit.addEqualTo("responsibilityId", parentResponsibilityId);
        }

        crit.addIn("delegateRuleId", getRuleBaseValuesSubQuery(docTypeName, ruleTemplateId,
FileProjectLine
org/kuali/rice/kew/engine/node/RouteNodeUtils.javaRice Implementation123
org/kuali/rice/kew/engine/node/service/impl/RouteNodeServiceImpl.javaRice Implementation236
    public List<RouteNode> getFlattenedNodes(ProcessDefinitionBo process) {
        Map<String, RouteNode> nodesMap = new HashMap<String, RouteNode>();
        if (process.getInitialRouteNode() != null) {
            flattenNodeGraph(nodesMap, process.getInitialRouteNode());
            List<RouteNode> nodes = new ArrayList<RouteNode>(nodesMap.values());
            Collections.sort(nodes, new RouteNodeSorter());
            return nodes;
        } else {
            List<RouteNode> nodes = new ArrayList<RouteNode>();
            nodes.add(new RouteNode());
            return nodes;
        }

    }
    
    /**
     * Recursively walks the node graph and builds up the map.  Uses a map because we will
     * end up walking through duplicates, as is the case with Join nodes.
     */
    private void flattenNodeGraph(Map<String, RouteNode> nodes, RouteNode node) {
FileProjectLine
org/kuali/rice/kim/impl/permission/PermissionServiceImpl.javaRice KIM Impl185
org/kuali/rice/kim/impl/permission/PermissionServiceImpl.javaRice KIM Impl235
    public List<Permission> getAuthorizedPermissionsByTemplateName( String principalId, String namespaceCode, String permissionTemplateName, Map<String, String> permissionDetails, Map<String, String> qualification ) {
        if (StringUtils.isBlank(principalId)) {
            throw new RiceIllegalArgumentException("principalId is null or blank");
        }

        if (StringUtils.isBlank(namespaceCode)) {
            throw new RiceIllegalArgumentException("namespaceCode is null or blank");
        }

        if (StringUtils.isBlank(permissionTemplateName)) {
            throw new RiceIllegalArgumentException("permissionTemplateName is null or blank");
        }
        if (qualification == null) {
            throw new RiceIllegalArgumentException("qualification is null");
        }
        if (permissionDetails == null) {
            throw new RiceIllegalArgumentException("permissionDetails is null");
        }
        // get all the permission objects whose name match that requested
    	List<PermissionBo> permissions = getPermissionImplsByTemplateName( namespaceCode, permissionTemplateName );
FileProjectLine
org/kuali/rice/krad/dao/impl/LookupDaoJpa.javaRice Implementation409
org/kuali/rice/krad/dao/impl/LookupDaoOjb.javaRice Implementation314
        if (!treatWildcardsAndOperatorsAsLiteral && StringUtils.contains(propertyValue, SearchOperator.OR.op())) {
            addOrCriteria(propertyName, propertyValue, propertyType, caseInsensitive, criteria);
            return;
        }

        if (!treatWildcardsAndOperatorsAsLiteral && StringUtils.contains(propertyValue, SearchOperator.AND.op())) {
            addAndCriteria(propertyName, propertyValue, propertyType, caseInsensitive, criteria);
            return;
        }

        if (StringUtils.containsIgnoreCase(propertyValue, SearchOperator.NULL.op())) {
        	if (StringUtils.contains(propertyValue, SearchOperator.NOT.op())) {
        		criteria.addColumnNotNull(propertyName);
FileProjectLine
org/kuali/rice/kew/docsearch/xml/StandardGenericXMLSearchableAttribute.javaRice Implementation100
org/kuali/rice/kew/docsearch/xml/StandardGenericXMLSearchableAttribute.javaRice Implementation116
				String findField = "//searchingConfig/" + FIELD_DEF_E;
				NodeList nodes = (NodeList) xpath.evaluate(findField, getConfigXML(extensionDefinition), XPathConstants.NODESET);
				if (nodes == null || nodes.getLength() == 0) {
					return "";
				}
				for (int i = 0; i < nodes.getLength(); i++) {
					Node field = nodes.item(i);
					NamedNodeMap fieldAttributes = field.getAttributes();
					if (propertyDefinitionMap != null && !StringUtils.isBlank(propertyDefinitionMap.get(fieldAttributes.getNamedItem("name").getNodeValue()))) {
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.javaRice Core Framework472
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.javaRice Core Framework567
					ManyToMany relation = field.getAnnotation(ManyToMany.class);
					descriptor.setAttributeName(field.getName());
					if (relation.targetEntity().equals(void.class)) {
						descriptor.setTargetEntity((Class)((ParameterizedType)field.getGenericType()).getActualTypeArguments()[0]);
					} else {
						descriptor.setTargetEntity(relation.targetEntity());
						fieldDescriptor.setTargetClazz(relation.targetEntity());
					}
					descriptor.setCascade(relation.cascade());
					descriptor.setFetch(relation.fetch());
					descriptor.setMappedBy(relation.mappedBy());
FileProjectLine
org/kuali/rice/krms/api/repository/category/CategoryDefinition.javaRice KRMS API129
org/kuali/rice/krms/api/repository/type/KrmsAttributeDefinition.javaRice KRMS API187
            builder.setVersionNumber(contract.getVersionNumber());
            return builder;
        }

		/**
		 * Sets the value of the id on this builder to the given value.
		 * 
		 * @param id the id value to set, must be null or non-blank
		 * @throws IllegalArgumentException if the id is non-null and blank
		 */
        public void setId(String id) {
            if (null != id && StringUtils.isBlank(id)) {
                throw new IllegalArgumentException("id must be null or non-blank");
            }
            this.id = id;
        }

		public void setName(String name) {
            if (StringUtils.isBlank(name)) {
                throw new IllegalArgumentException("name is blank");
            }
			this.name = name;
		}

		public void setNamespace(String namespace) {
            if (StringUtils.isBlank(namespace)) {
                throw new IllegalArgumentException("namespace is blank");
            }
			this.namespace = namespace;
		}
		
		public void setLabel(String label) {
FileProjectLine
org/kuali/rice/kim/api/identity/privacy/EntityPrivacyPreferences.javaRice KIM API77
org/kuali/rice/kim/api/identity/privacy/EntityPrivacyPreferences.javaRice KIM API162
            return new EntityPrivacyPreferences(this);
        }

        @Override
        public String getEntityId() {
            return this.entityId;
        }

        @Override
        public boolean isSuppressName() {
            return this.suppressName;
        }

        @Override
        public boolean isSuppressAddress() {
            return this.suppressAddress;
        }

        @Override
        public boolean isSuppressEmail() {
            return this.suppressEmail;
        }

        @Override
        public boolean isSuppressPhone() {
            return this.suppressPhone;
        }

        @Override
        public boolean isSuppressPersonal() {
            return this.suppressPersonal;
        }

        @Override
        public Long getVersionNumber() {
            return this.versionNumber;
        }

        @Override
        public String getObjectId() {
            return this.objectId;
        }

        public void setEntityId(String entityId) {
FileProjectLine
org/kuali/rice/kim/api/role/PassThruRoleTypeServiceBase.javaRice Client Contrib63
org/kuali/rice/kns/kim/role/RoleTypeServiceBase.javaRice KNS104
	}

	/**
	 * This simple initial implementation just calls  
	 * {@link #getRoleMembersFromApplicationRole(String, String, Map<String, String>)} and checks the results.
	 *
	 */
    @Override
	public boolean hasApplicationRole(String principalId, List<String> groupIds, String namespaceCode, String roleName, Map<String, String> qualification) {
	    if (StringUtils.isBlank(principalId)) {
            throw new RiceIllegalArgumentException("principalId was null or blank");
        }

        if (groupIds == null) {
            throw new RiceIllegalArgumentException("groupIds was null or blank");
        }

        if (StringUtils.isBlank(namespaceCode)) {
            throw new RiceIllegalArgumentException("namespaceCode was null or blank");
        }

        if (StringUtils.isBlank(roleName)) {
            throw new RiceIllegalArgumentException("roleName was null or blank");
        }

        if (qualification == null) {
            throw new RiceIllegalArgumentException("qualification was null or blank");
FileProjectLine
org/kuali/rice/kim/api/identity/affiliation/EntityAffiliation.javaRice KIM API41
org/kuali/rice/kim/api/identity/name/EntityName.javaRice KIM API80
    @XmlElement(name = CoreConstants.CommonElements.VERSION_NUMBER, required = false)
    private final Long versionNumber;
    @XmlElement(name = CoreConstants.CommonElements.OBJECT_ID, required = false)
    private final String objectId;
    @XmlElement(name = Elements.DEFAULT_VALUE, required = false)
    private final boolean defaultValue;
    @XmlElement(name = Elements.ACTIVE, required = false)
    private final boolean active;
    @XmlElement(name = Elements.ID, required = false)
    private final String id;
    @SuppressWarnings("unused")
    @XmlAnyElement
    private final Collection<Element> _futureElements = null;

    /**
     * Private constructor used only by JAXB.
     * 
     */
    private EntityName() {
FileProjectLine
org/kuali/rice/ksb/messaging/web/KSBAction.javaRice Implementation110
org/kuali/rice/kns/web/struts/action/KualiAction.javaRice KNS872
    }

    /**
     * Override this method to provide action-level access controls to the application.
     *
     * @param form
     * @throws AuthorizationException
     */
    protected void checkAuthorization( ActionForm form, String methodToCall) throws AuthorizationException 
    {
    	String principalId = GlobalVariables.getUserSession().getPrincipalId();
    	Map<String, String> roleQualifier = new HashMap<String, String>(getRoleQualification(form, methodToCall));
    	Map<String, String> permissionDetails = KRADUtils.getNamespaceAndActionClass(this.getClass());
    	
        if (!KimApiServiceLocator.getPermissionService().isAuthorizedByTemplateName(principalId, KRADConstants.KRAD_NAMESPACE,
        		KimConstants.PermissionTemplateNames.USE_SCREEN, permissionDetails, roleQualifier ))
        {
            throw new AuthorizationException(GlobalVariables.getUserSession().getPerson().getPrincipalName(), 
FileProjectLine
org/kuali/rice/kew/rule/web/RoutingReportAction.javaRice Implementation377
org/kuali/rice/kew/rule/web/WebRuleBaseValues.javaRice Implementation238
				setRuleTemplateName(ruleTemplate.getName());
				List ruleTemplateAttributes = ruleTemplate.getActiveRuleTemplateAttributes();
				Collections.sort(ruleTemplateAttributes);
				List rows = new ArrayList();
				for (Iterator iter = ruleTemplateAttributes.iterator(); iter.hasNext();) {
					RuleTemplateAttribute ruleTemplateAttribute = (RuleTemplateAttribute) iter.next();
					if (!ruleTemplateAttribute.isWorkflowAttribute()) {
						continue;
					}
					WorkflowAttribute workflowAttribute = ruleTemplateAttribute.getWorkflowAttribute();

					RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute();
					if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) {
						((GenericXMLRuleAttribute) workflowAttribute).setRuleAttribute(ruleAttribute);
					}
FileProjectLine
org/kuali/rice/kew/rule/dao/impl/RuleDAOJpaImpl.javaRice Implementation169
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.javaRice Implementation163
		List responsibilities = (List) this.getPersistenceBrokerTemplate().getCollectionByQuery(new QueryByCriteria(RuleResponsibility.class, crit));
		List rules = new ArrayList();

		for (Iterator iter = responsibilities.iterator(); iter.hasNext();) {
			RuleResponsibility responsibility = (RuleResponsibility) iter.next();
			RuleBaseValues rule = responsibility.getRuleBaseValues();
			if (rule != null && rule.getCurrentInd() != null && rule.getCurrentInd().booleanValue()) {
				rules.add(rule);
			}
		}
		return rules;
	}

	public List<RuleBaseValues> findRuleBaseValuesByResponsibilityReviewerTemplateDoc(String ruleTemplateName, String documentType, String reviewerName, String type) {
	    Criteria crit = new Criteria();
FileProjectLine
org/kuali/rice/kcb/config/KCBInitializer.javaRice Implementation80
org/kuali/rice/kew/mail/service/impl/ActionListEmailServiceImpl.javaRice Implementation596
		getScheduler().addJob(jobDetail, true);
	}

	private void addTriggerToScheduler(Trigger trigger) throws SchedulerException {
		boolean triggerExists = (getScheduler().getTrigger(trigger.getName(), trigger.getGroup()) != null);
		if (!triggerExists) {
			try {
				getScheduler().scheduleJob(trigger);
			} catch (ObjectAlreadyExistsException ex) {
				getScheduler().rescheduleJob(trigger.getName(), trigger.getGroup(), trigger);
			}
		} else {
		    getScheduler().rescheduleJob(trigger.getName(), trigger.getGroup(), trigger);
		}
	}
FileProjectLine
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.javaRice Core Framework455
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.javaRice Core Framework601
							descriptor.setInsertable(jc.insertable());
							descriptor.setUpdateable(jc.updatable());
						}
						if (field.isAnnotationPresent(JoinColumns.class)) {
							JoinColumns jcs = field.getAnnotation(JoinColumns.class);
							for (JoinColumn jc : jcs.value()) {
								descriptor.addJoinColumnDescriptor(constructJoinDescriptor(jc));
								descriptor.addFkField(entityDescriptor.getFieldByColumnName(jc.name()).getName());
								descriptor.setInsertable(jc.insertable());
								descriptor.setUpdateable(jc.updatable());
							} 
						}
FileProjectLine
org/kuali/rice/core/api/parameter/ParameterType.javaRice Core API57
org/kuali/rice/shareddata/api/campus/CampusType.javaRice Shared Data API55
	@XmlElement(name = Elements.CODE, required=true)
	private final String code;

    @XmlElement(name = Elements.NAME, required=false)
	private final String name;

	@XmlElement(name = Elements.ACTIVE, required=false)
	private final boolean active;

    @XmlElement(name = CoreConstants.CommonElements.VERSION_NUMBER, required = false)
    private final Long versionNumber;

    @XmlElement(name = CoreConstants.CommonElements.OBJECT_ID, required = false)
	private final String objectId;
    
	@SuppressWarnings("unused")
    @XmlAnyElement
    private final Collection<Element> _futureElements = null;
	
	 /** 
     * This constructor should never be called.  It is only present for use during JAXB unmarshalling. 
     */
    private CampusType() {
FileProjectLine
org/kuali/rice/krad/service/impl/PersistenceServiceImpl.javaRice Implementation89
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.javaRice Implementation256
	}

	/**
	 * @see org.kuali.rice.krad.service.PersistenceService#retrieveReferenceObjects(java.util.List, java.util.List)
	 */
	public void retrieveReferenceObjects(List persistableObjects, List referenceObjectNames) {
        if (persistableObjects == null) {
            throw new IllegalArgumentException("invalid (null) persistableObjects");
        }
        if (persistableObjects.isEmpty()) {
            throw new IllegalArgumentException("invalid (empty) persistableObjects");
        }
        if (referenceObjectNames == null) {
            throw new IllegalArgumentException("invalid (null) referenceObjectNames");
        }
        if (referenceObjectNames.isEmpty()) {
            throw new IllegalArgumentException("invalid (empty) referenceObjectNames");
        }

        for (Iterator i = persistableObjects.iterator(); i.hasNext();) {
            Object persistableObject = i.next();
            retrieveReferenceObjects(persistableObject, referenceObjectNames);
        }
	}
FileProjectLine
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.javaRice Implementation163
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.javaRice Implementation188
		List responsibilities = (List) this.getPersistenceBrokerTemplate().getCollectionByQuery(new QueryByCriteria(RuleResponsibility.class, crit));
		List rules = new ArrayList();

		for (Iterator iter = responsibilities.iterator(); iter.hasNext();) {
			RuleResponsibility responsibility = (RuleResponsibility) iter.next();
			RuleBaseValues rule = responsibility.getRuleBaseValues();
			if (rule != null && rule.getCurrentInd() != null && rule.getCurrentInd().booleanValue()) {
				rules.add(rule);
			}
		}
		return rules;
	}

	public List findRuleBaseValuesByObjectGraph(RuleBaseValues ruleBaseValues) {
FileProjectLine
org/kuali/rice/kew/notes/CustomNoteAttributeImpl.javaRice Implementation28
org/kuali/rice/kew/notes/WorkflowNoteAttributeImpl.javaRice Implementation28
public class WorkflowNoteAttributeImpl implements CustomNoteAttribute {

    private RouteHeaderDTO routeHeaderVO;

    private UserSession userSession;

    @Override
	public boolean isAuthorizedToAddNotes() throws Exception {
        return true;
    }

    /**
     * By default the individual who authored the note is the only one allowed to edit it.
     */
    @Override
	public boolean isAuthorizedToEditNote(Note note) throws Exception {
    	return note.getNoteAuthorWorkflowId().equalsIgnoreCase(userSession.getPrincipalId());
    }

    @Override
	public RouteHeaderDTO getRouteHeaderVO() {
        return routeHeaderVO;
    }

    @Override
	public void setRouteHeaderVO(RouteHeaderDTO routeHeaderVO) {
        this.routeHeaderVO = routeHeaderVO;
    }

	@Override
	public UserSession getUserSession() {
		return userSession;
	}

	@Override
	public void setUserSession(UserSession userSession) {
		this.userSession = userSession;
	}

}
FileProjectLine
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.javaRice Implementation563
org/kuali/rice/ken/web/spring/SendNotificationMessageController.javaRice Implementation523
        Date d = null;
        if (StringUtils.isNotBlank(sendDateTime)) {
            try {
                d = Util.parseUIDateTime(sendDateTime);
            } catch (ParseException pe) {
                errors.addError("You specified an invalid send date and time.  Please use the calendar picker.");
            }
            notification.setSendDateTime(new Timestamp(d.getTime()));
        }

        Date d2 = null;
        if (StringUtils.isNotBlank(autoRemoveDateTime)) {
            try {
                d2 = Util.parseUIDateTime(autoRemoveDateTime);
                if (d2.before(d)) {
                    errors.addError("Auto Remove Date/Time cannot be before Send Date/Time.");
                }
            } catch (ParseException pe) {
                errors.addError("You specified an invalid auto remove date and time.  Please use the calendar picker.");
FileProjectLine
org/kuali/rice/edl/framework/extract/FieldDTO.javaRice EDL Framework31
org/kuali/rice/edl/impl/extract/Fields.javaRice EDL Impl78
	public Long getFieldId() {
		return fieldId;
	}
	public String getDocId() {
		return docId;
	}
	public void setDocId(final String docId) {
		this.docId = docId;
	}
	public String getFieldValue() {
		return fieldValue;
	}
	public void setFieldValue(final String fieldValue) {
		this.fieldValue = fieldValue;
	}
	public String getFiledName() {
		return fieldName;
	}
	public void setFieldName(final String filedName) {
		this.fieldName = filedName;
	}
	public Integer getLockVerNbr() {
		return lockVerNbr;
	}
	public void setLockVerNbr(final Integer lockVerNbr) {
		this.lockVerNbr = lockVerNbr;
	}
FileProjectLine
org/kuali/rice/krms/api/engine/TermResolutionException.javaRice KRMS API59
org/kuali/rice/krms/api/engine/TermResolutionException.javaRice KRMS API79
		super(message + " " + buildResolutionInfoString(tr, parameters));
		if (tr == null) {
			termResolverClassName = "";
			outputTerm = null;
			prereqs = null;
			parameterNames = null;
		} else {
			termResolverClassName = tr.getClass().getName();
			outputTerm = tr.getOutput();
			prereqs = tr.getPrerequisites();
			parameterNames = Collections.unmodifiableSet(new HashSet<String>(tr.getParameterNames()));
		}
		if (parameters != null){
			this.parameters = Collections.unmodifiableMap(new HashMap<String, String>(parameters));
		} else {
			this.parameters = null;
		}
	}
FileProjectLine
org/kuali/rice/krad/service/impl/MaintenanceDocumentServiceImpl.javaRice Implementation174
org/kuali/rice/kns/web/struts/action/KualiMaintenanceDocumentAction.javaRice KNS293
				boolean allowsEdit = getBusinessObjectAuthorizationService().canMaintain(oldBusinessObject, GlobalVariables.getUserSession().getPerson(), document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName());
				if (!allowsEdit) {
					LOG.error("Document type " + document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName() + " does not allow edit actions.");
					throw  new DocumentTypeAuthorizationException(GlobalVariables.getUserSession().getPerson().getPrincipalId(), "edit", document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName());
				}
				document.getNewMaintainableObject().processAfterEdit( document, request.getParameterMap() );
FileProjectLine
org/kuali/rice/kew/docsearch/SearchableAttributeDateTimeValue.javaRice Implementation215
org/kuali/rice/kew/docsearch/SearchableAttributeFloatValue.javaRice Implementation239
                return (lower.compareTo(upper) <= 0);
            }
            return true;
        }
        return null;
    }

	public String getOjbConcreteClass() {
        return ojbConcreteClass;
    }

    public void setOjbConcreteClass(String ojbConcreteClass) {
        this.ojbConcreteClass = ojbConcreteClass;
    }

    public DocumentRouteHeaderValue getRouteHeader() {
        return routeHeader;
    }

    public void setRouteHeader(DocumentRouteHeaderValue routeHeader) {
        this.routeHeader = routeHeader;
    }

    public String getDocumentId() {
        return documentId;
    }

    public void setDocumentId(String documentId) {
        this.documentId = documentId;
    }

    public String getSearchableAttributeKey() {
        return searchableAttributeKey;
    }

    public void setSearchableAttributeKey(String searchableAttributeKey) {
        this.searchableAttributeKey = searchableAttributeKey;
    }

    public BigDecimal getSearchableAttributeValue() {
FileProjectLine
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.javaRice Implementation217
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.javaRice Implementation127
                crit.addEqualTo("routeHeader.docRouteStatus", filter.getDocRouteStatus());
            }
            filteredByItems += filteredByItems.length() > 0 ? ", " : "";
            filteredByItems += "Document Route Status";
        }

        if (filter.getDocumentTitle() != null && !"".equals(filter.getDocumentTitle().trim())) {
            String docTitle = filter.getDocumentTitle();
            if (docTitle.trim().endsWith("*")) {
                docTitle = docTitle.substring(0, docTitle.length() - 1);
            }

            if (filter.isExcludeDocumentTitle()) {
                crit.addNotLike("docTitle", "%" + docTitle + "%");
FileProjectLine
edu/sampleu/travel/krad/form/UILayoutTestForm.javaRice Sample App214
edu/sampleu/travel/krad/form/UITestListObject.javaRice Sample App52
    }

    /**
     * @return the field1
     */
    public String getField1() {
        return this.field1;
    }

    /**
     * @param field1 the field1 to set
     */
    public void setField1(String field1) {
        this.field1 = field1;
    }

    /**
     * @return the field2
     */
    public String getField2() {
        return this.field2;
    }

    /**
     * @param field2 the field2 to set
     */
    public void setField2(String field2) {
        this.field2 = field2;
    }

    /**
     * @return the field3
     */
    public String getField3() {
        return this.field3;
    }

    /**
     * @param field3 the field3 to set
     */
    public void setField3(String field3) {
        this.field3 = field3;
    }

    /**
     * @return the field4
     */
    public String getField4() {
        return this.field4;
    }

    /**
     * @param field4 the field4 to set
     */
    public void setField4(String field4) {
        this.field4 = field4;
    }

    /**
     * @param subList the subList to set
     */
    public void setSubList(List<UITestListObject> subList) {
FileProjectLine
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.javaRice Implementation150
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.javaRice Implementation241
    public void makeCurrent2(List rules) {
        PerformanceLogger performanceLogger = new PerformanceLogger();

        boolean isGenerateRuleArs = true;
        String generateRuleArs = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString(KEWConstants.KEW_NAMESPACE, KRADConstants.DetailTypes.RULE_DETAIL_TYPE, KEWConstants.RULE_GENERATE_ACTION_REQESTS_IND);
        if (!StringUtils.isBlank(generateRuleArs)) {
            isGenerateRuleArs = KEWConstants.YES_RULE_CHANGE_AR_GENERATION_VALUE.equalsIgnoreCase(generateRuleArs);
        }
        Set<String> responsibilityIds = new HashSet<String>();
        Map<String, RuleBaseValues> rulesToSave = new HashMap<String, RuleBaseValues>();

        Collections.sort(rules, new RuleDelegationSorter());
FileProjectLine
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.javaRice Implementation490
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.javaRice Implementation334
                        throw new RuntimeException("Cannot access PropertyType for property " + "'" + col.getPropertyName() + "' " + " on an instance of '" + element.getClass().getName() + "'.", e);
                    }
                }

                // formatters
                if (prop != null) {
                    // for Booleans, always use BooleanFormatter
                    if (prop instanceof Boolean) {
                        formatter = new BooleanFormatter();
                    }

                    // for Dates, always use DateFormatter
                    if (prop instanceof Date) {
                        formatter = new DateFormatter();
                    }

                    // for collection, use the list formatter if a formatter hasn't been defined yet
                    if (prop instanceof Collection && formatter == null) {
                    formatter = new CollectionFormatter();
                    }

                    if (formatter != null) {
                        propValue = (String) formatter.format(prop);
                    }
                    else {
                        propValue = prop.toString();
FileProjectLine
org/kuali/rice/ken/web/spring/UserPreferencesController.javaRice Implementation107
org/kuali/rice/ken/web/spring/UserPreferencesController.javaRice Implementation188
       this.userPreferenceService.subscribeToChannel(newSub);
       
       // get current subscription channel ids
       Collection<UserChannelSubscription> subscriptions = this.userPreferenceService.getCurrentSubscriptions(userid);
       Map<String, Object> currentsubs = new HashMap<String, Object>();;
       Iterator<UserChannelSubscription> i = subscriptions.iterator();
       while (i.hasNext()) {
 	  UserChannelSubscription sub = i.next();
 	  String subid = Long.toString(sub.getChannel().getId());
 	  currentsubs.put(subid, subid);
 	  LOG.debug("currently subscribed to: "+sub.getChannel().getId());
       }
FileProjectLine
org/kuali/rice/kns/web/struts/action/KualiDocumentActionBase.javaRice KNS1229
org/kuali/rice/kns/web/struts/action/KualiInquiryAction.javaRice KNS411
        request.setAttribute(KRADConstants.INQUIRABLE_ATTRIBUTE_NAME, kualiInquirable);
    }
    
    /**
    *
    * Handy method to stream the byte array to response object
    * @param attachmentDataSource
    * @param response
    * @throws Exception
    */
   protected void streamToResponse(byte[] fileContents, String fileName, String fileContentType,HttpServletResponse response) throws Exception{
       ByteArrayOutputStream baos = null;
       try{
           baos = new ByteArrayOutputStream(fileContents.length);
           baos.write(fileContents);
           WebUtils.saveMimeOutputStreamAsFile(response, fileContentType, baos, fileName);
       }finally{
           try{
               if(baos!=null){
                   baos.close();
                   baos = null;
               }
           }catch(IOException ioEx){
               LOG.error("Error while downloading attachment");
               throw new RuntimeException("IOException occurred while downloading attachment", ioEx);
           }
       }
   }
FileProjectLine
org/kuali/rice/kim/api/identity/citizenship/EntityCitizenship.javaRice KIM API97
org/kuali/rice/kim/api/identity/citizenship/EntityCitizenship.javaRice KIM API189
        public Type.Builder getStatus() {
            return this.status;
        }

        @Override
        public String getCountryCode() {
            return this.countryCode;
        }

        @Override
        public DateTime getStartDate() {
            return this.startDate;
        }

        @Override
        public DateTime getEndDate() {
            return this.endDate;
        }

        @Override
        public Long getVersionNumber() {
            return this.versionNumber;
        }

        @Override
        public String getObjectId() {
            return this.objectId;
        }

        @Override
        public boolean isActive() {
            return this.active;
        }

        @Override
        public String getId() {
            return this.id;
        }

        public void setEntityId(String entityId) {
FileProjectLine
org/kuali/rice/kim/api/identity/Type.javaRice KIM API155
org/kuali/rice/kim/api/identity/external/EntityExternalIdentifierType.javaRice KIM API170
        }

        @Override
        public Long getVersionNumber() {
            return this.versionNumber;
        }

        @Override
        public String getObjectId() {
            return this.objectId;
        }

        @Override
        public boolean isActive() {
            return this.active;
        }

        public void setName(String name) {
            this.name = name;
        }

        public void setCode(String code) {
            if (StringUtils.isWhitespace(code)) {
                throw new IllegalArgumentException("code is empty");
            }
            this.code = code;
        }

        public void setSortCode(String sortCode) {
            this.sortCode = sortCode;
        }

        public void setEncryptionRequired(boolean encryptionRequired) {
FileProjectLine
org/kuali/rice/kew/rule/web/RoutingReportAction.javaRice Implementation400
org/kuali/rice/kew/rule/web/RoutingReportAction.javaRice Implementation418
					if (request.getParameter(field.getPropertyName()) != null) {
						field.setPropertyValue(request.getParameter(field.getPropertyName()));
					} else if (routingReportForm.getFields() != null && !routingReportForm.getFields().isEmpty()) {
						field.setPropertyValue((String) routingReportForm.getFields().get(field.getPropertyName()));
					}
					fields.add(field);
					fieldValues.put(field.getPropertyName(), field.getPropertyValue());
				}
FileProjectLine
org/kuali/rice/kew/rule/dao/impl/RuleDAOJpaImpl.javaRice Implementation169
org/kuali/rice/kew/rule/dao/impl/RuleDAOJpaImpl.javaRice Implementation194
		List responsibilities = (List) new QueryByCriteria(entityManager, crit).toQuery().getResultList();
		List rules = new ArrayList();

		for (Iterator iter = responsibilities.iterator(); iter.hasNext();) {
			RuleResponsibility responsibility = (RuleResponsibility) iter.next();
			RuleBaseValues rule = responsibility.getRuleBaseValues();
			if (rule != null && rule.getCurrentInd() != null && rule.getCurrentInd().booleanValue()) {
				rules.add(rule);
			}
		}
		return rules;
	}

	//FIXME nothing uses this, it's not in ruleDAO interface
//	public List findRuleBaseValuesByObjectGraph(RuleBaseValues ruleBaseValues) {
//		ruleBaseValues.setCurrentInd(Boolean.TRUE);
//		ruleBaseValues.setTemplateRuleInd(Boolean.FALSE);
//		return (List) new QueryByObject(entityManager,ruleBaseValues).toQuery().getResultList();
//	}

	public RuleResponsibility findRuleResponsibility(String responsibilityId) {
FileProjectLine
org/kuali/rice/kew/documentoperation/web/DocumentOperationAction.javaRice Implementation356
org/kuali/rice/kew/documentoperation/web/DocumentOperationAction.javaRice Implementation378
				List nodeStates=routeNodeInstance.getState();
				List nodeStatesNew=routeNodeInstanceNew.getState();
				if(nodeStates!=null){
				   for(int i=0;i<nodeStates.size();i++){
					   NodeState nodeState=(NodeState)nodeStates.get(i);
					   NodeState nodeStateNew=(NodeState)nodeStatesNew.get(i);
					   if(nodeStateNew.getKey()==null || nodeStateNew.getKey().trim().equals("")){
						     statesToBeDeleted.remove(nodeState.getNodeStateId());
					   }
FileProjectLine
org/kuali/rice/kew/actions/ActionTakenEvent.javaRice Implementation203
org/kuali/rice/kew/messaging/exceptionhandling/ExceptionRoutingServiceImpl.javaRice Implementation133
        DocumentRouteStatusChange statusChangeEvent = new DocumentRouteStatusChange(routeHeader.getDocumentId(), routeHeader.getAppDocId(), oldStatusCode, newStatusCode);
        try {
            LOG.debug("Notifying post processor of status change "+oldStatusCode+"->"+newStatusCode);
            PostProcessor postProcessor = routeHeader.getDocumentType().getPostProcessor();
            ProcessDocReport report = postProcessor.doRouteStatusChange(statusChangeEvent);
            if (!report.isSuccess()) {
                LOG.warn(report.getMessage(), report.getProcessException());
                throw new InvalidActionTakenException(report.getMessage());
            }
        } catch (Exception ex) {
FileProjectLine
org/kuali/rice/core/impl/config/property/ConfigParserImpl.javaRice Core Impl200
org/kuali/rice/core/impl/config/property/JAXBConfigImpl.javaRice Core Impl513
    	this.setProperty("host.name", RiceUtilities.getHostName());
    }

    /**
     * Generates a random integer in the range specified by the specifier, in the format: min-max
     * 
     * @param rangeSpec
     *            a range specification, 'min-max'
     * @return a random integer in the range specified by the specifier, in the format: min-max
     */
    protected int generateRandomInteger(String rangeSpec) {
        String[] range = rangeSpec.split("-");
        if (range.length != 2) {
            throw new RuntimeException("Invalid range specifier: " + rangeSpec);
        }
        int from = Integer.parseInt(range[0].trim());
        int to = Integer.parseInt(range[1].trim());
        if (from > to) {
            int tmp = from;
            from = to;
            to = tmp;
        }
        int num;
        // not very random huh...
        if (from == to) {
            num = from;
FileProjectLine
org/kuali/rice/kim/api/role/RoleResponsibility.javaRice KIM API199
org/kuali/rice/kim/api/role/RoleResponsibilityAction.javaRice KIM API275
        }

        @Override
        public Long getVersionNumber() {
            return versionNumber;
        }

        public void setVersionNumber(Long versionNumber) {
            if (versionNumber == null) {
                throw new IllegalArgumentException("versionNumber must be non-null");
            }
            this.versionNumber = versionNumber;
        }

        @Override
        public int hashCode() {
            return HashCodeBuilder.reflectionHashCode(this);
        }

        @Override
        public boolean equals(Object obj) {
            return EqualsBuilder.reflectionEquals(obj, this);
        }

        @Override
        public String toString() {
            return ToStringBuilder.reflectionToString(this);
        }
    }


    /**
     * A private class which exposes constants which define the XML element names to use
     * when this object is marshalled to XML.
     */
    static class Elements {
        final static String ID = "id";
FileProjectLine
org/kuali/rice/kim/api/common/attribute/KimAttribute.javaRice KIM API245
org/kuali/rice/kim/api/responsibility/Responsibility.javaRice KIM API298
		}
		
		@Override
		public boolean isActive() {
			return active;
		}
		
		public void setActive(final boolean active) {
            this.active = active;
        }

		@Override
		public Long getVersionNumber() {
			return versionNumber;
		}

		public void setVersionNumber(final Long versionNumber) {
			if (versionNumber == null || versionNumber <= 0) {
	            throw new IllegalArgumentException("versionNumber is invalid");
	        }
			this.versionNumber = versionNumber;
	    }
		 
		@Override
		public String getObjectId() {
			return objectId;
		}

        public void setObjectId(final String objectId) {
            this.objectId = objectId;
        }

		@Override
		public Map<String, String> getAttributes() {
FileProjectLine
org/kuali/rice/ksb/messaging/web/KSBAction.javaRice Implementation112
org/kuali/rice/krad/web/controller/UifControllerBase.javaRice KRAD Web Framework155
    public void checkAuthorization(UifFormBase form, String methodToCall) throws AuthorizationException {
        String principalId = GlobalVariables.getUserSession().getPrincipalId();
        Map<String, String> roleQualifier = new HashMap<String, String>(getRoleQualification(form, methodToCall));
        Map<String, String> permissionDetails = KRADUtils.getNamespaceAndActionClass(this.getClass());

        if (!KimApiServiceLocator.getPermissionService().isAuthorizedByTemplateName(principalId,
                KRADConstants.KRAD_NAMESPACE, KimConstants.PermissionTemplateNames.USE_SCREEN, permissionDetails,
                roleQualifier)) {
            throw new AuthorizationException(GlobalVariables.getUserSession().getPerson().getPrincipalName(),