The following document contains the results of PMD's CPD 4.2.5.
File | Project | Line |
---|---|---|
org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.java | Rice KNS | 814 |
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.java | Rice KRAD Web Framework | 757 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/stats/web/StatsForm.java | Rice Implementation | 89 |
edu/sampleu/kew/krad/form/StatsForm.java | Rice Sample App | 72 |
} /** * 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; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/DocumentAuthorizerBase.java | Rice KRAD Web Framework | 57 |
org/kuali/rice/krad/uif/authorization/DocumentAuthorizerBase.java | Rice KRAD Web Framework | 53 |
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 ); |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 732 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 775 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.java | Rice Implementation | 296 |
org/kuali/rice/ken/web/spring/SendNotificationMessageController.java | Rice Implementation | 299 |
} 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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/service/impl/SessionDocumentServiceImpl.java | Rice Implementation | 147 |
org/kuali/rice/krad/service/impl/SessionDocumentServiceImpl.java | Rice Implementation | 71 |
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); } } } @Override public void setDocumentForm(DocumentFormBase form, UserSession userSession, String ipAddress) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 98 |
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 92 |
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>(); RuleTemplateBo ruleTemplate = null; ruleTemplate = getRuleTemplateService().findByRuleTemplateName(ruleTemplateNameParam); for (Object element : ruleTemplate.getActiveRuleTemplateAttributes()) { RuleTemplateAttributeBo ruleTemplateAttribute = (RuleTemplateAttributeBo) 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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 2211 |
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.java | Rice LDAP Connector | 390 |
} 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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.java | Rice KNS | 362 |
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.java | Rice KRAD Web Framework | 324 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 802 |
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.java | Rice LDAP Connector | 180 |
} 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 ) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/util/KEWConstants.java | Rice API | 676 |
org/kuali/rice/kew/api/KewApiConstants.java | Rice KEW API | 74 |
public static final String RULE_ATTRIBUTE_TYPE = "RuleAttribute"; public static final String SEARCHABLE_ATTRIBUTE_TYPE = "SearchableAttribute"; public static final String RULE_XML_ATTRIBUTE_TYPE = "RuleXmlAttribute"; public static final String SEARCHABLE_XML_ATTRIBUTE_TYPE = "SearchableXmlAttribute"; public static final String EXTENSION_ATTRIBUTE_TYPE = "ExtensionAttribute"; public static final String EMAIL_ATTRIBUTE_TYPE = "EmailAttribute"; public static final String NOTE_ATTRIBUTE_TYPE = "NoteAttribute"; public static final String ACTION_LIST_ATTRIBUTE_TYPE = "ActionListAttribute"; public static final String RULE_VALIDATION_ATTRIBUTE_TYPE = "RuleValidationAttribute"; public static final String SEARCH_GENERATOR_ATTRIBUTE_TYPE = "DocumentSearchGeneratorAttribute"; public static final String SEARCH_RESULT_PROCESSOR_ATTRIBUTE_TYPE = "DocumentSearchResultProcessorAttribute"; public static final String SEARCH_RESULT_XML_PROCESSOR_ATTRIBUTE_TYPE = "DocumentSearchXMLResultProcessorAttribute"; public static final String DOCUMENT_SEARCH_SECURITY_FILTER_ATTRIBUTE_TYPE = "DocumentSearchSecurityFilterAttribute"; public static final String QUALIFIER_RESOLVER_ATTRIBUTE_TYPE = "QualifierResolver"; public static final String DOCUMENT_LOOKUP_CUSTOMIZER_ATTRIBUTE_TYPE = "DocumentLookupCustomizer"; public static final String RULE_ATTRIBUTE_TYPE_LABEL = "Rule Attribute"; public static final String SEARCHABLE_ATTRIBUTE_TYPE_LABEL = "Searchable Attribute"; public static final String RULE_XML_ATTRIBUTE_TYPE_LABEL = "Rule Xml Attribute"; public static final String SEARCHABLE_XML_ATTRIBUTE_TYPE_LABEL = "Searchable Xml Attribute"; public static final String EXTENSION_ATTRIBUTE_TYPE_LABEL = "Extension Attribute"; public static final String EMAIL_ATTRIBUTE_TYPE_LABEL = "Email Attribute"; public static final String NOTE_ATTRIBUTE_TYPE_LABEL = "Note Attribute"; public static final String ACTION_LIST_ATTRIBUTE_TYPE_LABEL = "Action List Attribute"; public static final String RULE_VALIDATION_ATTRIBUTE_TYPE_LABEL = "Rule Validation Attribute"; public static final String SEARCH_GENERATOR_ATTRIBUTE_TYPE_LABEL = "Document Search Generator Attribute"; public static final String SEARCH_RESULT_PROCESSOR_ATTRIBUTE_TYPE_LABEL = "Document Search Result Processor Attribute"; public static final String SEARCH_RESULT_XML_PROCESSOR_ATTRIBUTE_TYPE_LABEL = "Document Search Result Processor XML Attribute"; public static final String DOCUMENT_SEARCH_SECURITY_FILTER_ATTRIBUTE_TYPE_LABEL = "Document Search Security Filter Attribute"; public static final String QUALIFIER_RESOLVER_ATTRIBUTE_TYPE_LABEL = "Qualifier Resolver"; public static final String[] RULE_ATTRIBUTE_TYPES = { RULE_ATTRIBUTE_TYPE, SEARCHABLE_ATTRIBUTE_TYPE, RULE_XML_ATTRIBUTE_TYPE, SEARCHABLE_XML_ATTRIBUTE_TYPE, EXTENSION_ATTRIBUTE_TYPE, EMAIL_ATTRIBUTE_TYPE, NOTE_ATTRIBUTE_TYPE, ACTION_LIST_ATTRIBUTE_TYPE, RULE_VALIDATION_ATTRIBUTE_TYPE, SEARCH_GENERATOR_ATTRIBUTE_TYPE, SEARCH_RESULT_PROCESSOR_ATTRIBUTE_TYPE, SEARCH_RESULT_XML_PROCESSOR_ATTRIBUTE_TYPE, DOCUMENT_SEARCH_SECURITY_FILTER_ATTRIBUTE_TYPE, QUALIFIER_RESOLVER_ATTRIBUTE_TYPE }; public static final Map<String, String> RULE_ATTRIBUTE_TYPE_MAP; static { RULE_ATTRIBUTE_TYPE_MAP = new HashMap<String, String>(); RULE_ATTRIBUTE_TYPE_MAP.put(RULE_ATTRIBUTE_TYPE, RULE_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(SEARCHABLE_ATTRIBUTE_TYPE, SEARCHABLE_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(RULE_XML_ATTRIBUTE_TYPE, RULE_XML_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(SEARCHABLE_XML_ATTRIBUTE_TYPE, SEARCHABLE_XML_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(EXTENSION_ATTRIBUTE_TYPE, EXTENSION_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(EMAIL_ATTRIBUTE_TYPE, EMAIL_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(NOTE_ATTRIBUTE_TYPE, NOTE_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(ACTION_LIST_ATTRIBUTE_TYPE, ACTION_LIST_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(RULE_VALIDATION_ATTRIBUTE_TYPE, RULE_VALIDATION_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(SEARCH_GENERATOR_ATTRIBUTE_TYPE, SEARCH_GENERATOR_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(SEARCH_RESULT_PROCESSOR_ATTRIBUTE_TYPE, SEARCH_RESULT_PROCESSOR_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(SEARCH_RESULT_XML_PROCESSOR_ATTRIBUTE_TYPE, SEARCH_RESULT_XML_PROCESSOR_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(DOCUMENT_SEARCH_SECURITY_FILTER_ATTRIBUTE_TYPE, DOCUMENT_SEARCH_SECURITY_FILTER_ATTRIBUTE_TYPE_LABEL); RULE_ATTRIBUTE_TYPE_MAP.put(QUALIFIER_RESOLVER_ATTRIBUTE_TYPE, QUALIFIER_RESOLVER_ATTRIBUTE_TYPE_LABEL); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 287 |
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.java | Rice LDAP Connector | 77 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.java | Rice Implementation | 492 |
org/kuali/rice/ken/web/spring/SendNotificationMessageController.java | Rice Implementation | 453 |
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; |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.java | Rice KNS | 529 |
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.java | Rice KRAD Web Framework | 494 |
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."); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewAttributeDefinition.java | Rice KEW API | 178 |
org/kuali/rice/krms/api/repository/type/KrmsAttributeDefinition.java | Rice KRMS API | 178 |
public static Builder create(KrmsAttributeDefinitionContract contract) { if (contract == null) { throw new IllegalArgumentException("contract is null"); } Builder builder = new Builder(contract.getId(), contract.getName(), contract.getNamespace()); builder.setActive(contract.isActive()); builder.setLabel(contract.getLabel()); builder.setDescription(contract.getDescription()); builder.setComponentName(contract.getComponentName()); 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) { this.label = label; } public void setDescription(String description) { this.description = description; } public void setComponentName(String componentName) { this.componentName = componentName; } public void setActive(boolean active) { this.active = active; } public void setVersionNumber(Long versionNumber){ this.versionNumber = versionNumber; } @Override public String getId() { return id; } @Override public String getName() { return name; } @Override public String getNamespace() { return namespace; } @Override public String getComponentName() { return componentName; } @Override public String getLabel() { return label; } @Override public String getDescription() { return description; } @Override public boolean isActive() { return active; } @Override public Long getVersionNumber() { return versionNumber; } /** * Builds an instance of a CampusType based on the current state of the builder. * * @return the fully-constructed CampusType */ @Override public KrmsAttributeDefinition build() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/docsearch/SearchableAttributeFloatValue.java | Rice Implementation | 135 |
org/kuali/rice/kew/docsearch/SearchableAttributeLongValue.java | Rice Implementation | 134 |
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()) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/document/lookup/DocumentLookupCriteria.java | Rice KEW API | 242 |
org/kuali/rice/kew/api/document/lookup/DocumentLookupCriteria.java | Rice KEW API | 481 |
return new DocumentLookupCriteria(this); } @Override public String getDocumentId() { return this.documentId; } @Override public List<DocumentStatus> getDocumentStatuses() { return this.documentStatuses; } @Override public List<DocumentStatusCategory> getDocumentStatusCategories() { return this.documentStatusCategories; } @Override public String getTitle() { return this.title; } @Override public String getApplicationDocumentId() { return this.applicationDocumentId; } @Override public String getApplicationDocumentStatus() { return this.applicationDocumentStatus; } @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 DateTime getDateApplicationDocumentStatusChangedFrom() { return dateApplicationDocumentStatusChangedFrom; } @Override public DateTime getDateApplicationDocumentStatusChangedTo() { return dateApplicationDocumentStatusChangedTo; } @Override public Map<String, List<String>> getDocumentAttributeValues() { return this.documentAttributeValues; } @Override public String getSaveName() { return this.saveName; |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/permission/Permission.java | Rice KIM API | 246 |
org/kuali/rice/kim/api/responsibility/Responsibility.java | Rice KIM API | 243 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/edl/framework/extract/DumpDTO.java | Rice EDL Framework | 47 |
org/kuali/rice/edl/impl/extract/Dump.java | Rice EDL Impl | 89 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/MaintenanceDocumentAuthorizerBase.java | Rice Implementation | 60 |
org/kuali/rice/krad/uif/authorization/MaintenanceDocumentAuthorizerBase.java | Rice KRAD Web Framework | 56 |
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()); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/datadictionary/exporter/DocumentEntryMapper.java | Rice Implementation | 48 |
org/kuali/rice/kns/datadictionary/exporter/MaintenanceDocumentEntryMapper.java | Rice Implementation | 53 |
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)); |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/DocumentPresentationControllerBase.java | Rice KRAD Web Framework | 220 |
org/kuali/rice/krad/uif/authorization/DocumentPresentationControllerBase.java | Rice KRAD Web Framework | 42 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 305 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 377 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 325 |
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 284 |
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.getId()+"")); } else { myColumns.getColumns().add(new ConcreteKeyValue(field.getPropertyName(), ruleTemplateAttribute.getId()+"")); } } } } } } if (!org.apache.commons.lang.StringUtils.isEmpty(ruleDescription)) { ruleDescription = ruleDescription.replace('*', '%'); ruleDescription = "%" + ruleDescription.trim() + "%"; } if (!errors.isEmpty()) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceStructureServiceJpaImpl.java | Rice Implementation | 435 |
org/kuali/rice/krad/service/impl/PersistenceStructureServiceOjbImpl.java | Rice Implementation | 460 |
} } 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."); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 447 |
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 411 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/DocumentPresentationControllerBase.java | Rice KRAD Web Framework | 35 |
org/kuali/rice/krad/uif/authorization/DocumentPresentationControllerBase.java | Rice KRAD Web Framework | 119 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/service/impl/SessionDocumentServiceImpl.java | Rice Implementation | 278 |
org/kuali/rice/krad/service/impl/SessionDocumentServiceImpl.java | Rice Implementation | 199 |
} 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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 509 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 570 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 411 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 477 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 127 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 77 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.java | Rice Implementation | 227 |
org/kuali/rice/ken/web/spring/SendNotificationMessageController.java | Rice Implementation | 228 |
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 " |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 117 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 330 |
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); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 1164 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 1017 |
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(); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/DocumentAuthorizerBase.java | Rice KRAD Web Framework | 262 |
org/kuali/rice/krad/uif/authorization/DocumentAuthorizerBase.java | Rice KRAD Web Framework | 245 |
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()); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/ksb/security/soap/CXFWSS4JInInterceptor.java | Rice Implementation | 48 |
org/kuali/rice/ksb/security/soap/CXFWSS4JOutInterceptor.java | Rice Implementation | 45 |
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); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.java | Rice Implementation | 63 |
org/kuali/rice/ken/web/spring/SendNotificationMessageController.java | Rice Implementation | 62 |
.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( |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/action/ActionItem.java | Rice KEW API | 135 |
org/kuali/rice/kew/api/action/ActionItem.java | Rice KEW API | 305 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/core/impl/impex/xml/ClassLoaderEntityResolver.java | Rice Core Impl | 36 |
org/kuali/rice/kew/xml/ClassLoaderEntityResolver.java | Rice Implementation | 36 |
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); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 249 |
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 227 |
} 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)) { RuleTemplateBo ruleTemplate = null; if (ruleTemplateIdParam != null && !"".equals(ruleTemplateIdParam)) { ruleTemplateId = ruleTemplateIdParam; ruleTemplate = getRuleTemplateService().findByRuleTemplateId(ruleTemplateId); } else { ruleTemplate = getRuleTemplateService().findByRuleTemplateName(ruleTemplateNameParam.trim()); ruleTemplateId = ruleTemplate.getId(); } |
File | Project | Line |
---|---|---|
edu/sampleu/travel/krad/form/UILayoutTestForm.java | Rice Sample App | 380 |
edu/sampleu/travel/krad/form/UITestForm.java | Rice Sample App | 196 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.java | Rice Implementation | 305 |
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.java | Rice Implementation | 238 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/engine/node/RequestActivationNode.java | Rice Implementation | 91 |
org/kuali/rice/kew/engine/node/RoleNode.java | Rice Implementation | 171 |
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, |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToOneDescriptor.java | Rice Core Framework | 29 |
org/kuali/rice/core/framework/persistence/jpa/metadata/ObjectDescriptor.java | Rice Core Framework | 117 |
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(); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/DocumentAuthorizerBase.java | Rice KRAD Web Framework | 227 |
org/kuali/rice/krad/uif/authorization/DocumentAuthorizerBase.java | Rice KRAD Web Framework | 210 |
.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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/doctype/DocumentType.java | Rice KEW API | 148 |
org/kuali/rice/kew/api/doctype/DocumentType.java | Rice KEW API | 298 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.java | Rice Implementation | 230 |
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.java | Rice Implementation | 141 |
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); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 580 |
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 530 |
} } 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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/edl/impl/config/EDLConfigurer.java | Rice EDL Impl | 86 |
org/kuali/rice/kew/config/KEWConfigurer.java | Rice Implementation | 121 |
} @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; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/type/HibernateKualiEncryptDecryptUserType.java | Rice Core Framework | 34 |
org/kuali/rice/core/framework/persistence/jpa/type/KualiDecimalIntegerPercentFieldType.java | Rice Core Framework | 34 |
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 }; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/devtools/generators/jpa/JpaToDdl.java | Rice Development Tools | 80 |
org/kuali/rice/devtools/generators/jpa/JpaToOjbMetadata.java | Rice Development Tools | 78 |
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=\"" ); |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 1251 |
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.java | Rice LDAP Connector | 258 |
} 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.setStateProvinceCode(address.getStateProvinceCodeUnmasked()); 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 ) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/lookup/KualiLookupableHelperServiceImpl.java | Rice KNS | 316 |
org/kuali/rice/krad/lookup/LookupableImpl.java | Rice KRAD Web Framework | 344 |
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()); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/engine/node/IteratedRequestActivationNode.java | Rice Implementation | 250 |
org/kuali/rice/kew/engine/node/RequestActivationNode.java | Rice Implementation | 151 |
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); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 94 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 200 |
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 { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/service/impl/BusinessObjectMetaDataServiceImpl.java | Rice Implementation | 202 |
org/kuali/rice/krad/service/impl/DataObjectMetaDataServiceImpl.java | Rice Implementation | 303 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceStructureServiceJpaImpl.java | Rice Implementation | 341 |
org/kuali/rice/krad/service/impl/PersistenceStructureServiceOjbImpl.java | Rice Implementation | 357 |
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"); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 1714 |
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.java | Rice LDAP Connector | 342 |
} 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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/edl/impl/service/impl/EDocLiteServiceImpl.java | Rice EDL Impl | 211 |
org/kuali/rice/edl/impl/xml/EDocLiteXmlParser.java | Rice EDL Impl | 200 |
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()); |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/parameter/ParameterType.java | Rice Core API | 166 |
org/kuali/rice/shareddata/api/campus/CampusType.java | Rice Shared Data API | 171 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.java | Rice Implementation | 127 |
org/kuali/rice/kew/actionlist/web/ActionListAction.java | Rice Implementation | 474 |
} 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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 646 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 697 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 73 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 233 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.java | Rice KNS | 142 |
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.java | Rice KRAD Web Framework | 106 |
} /** * @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() |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceStructureServiceJpaImpl.java | Rice Implementation | 519 |
org/kuali/rice/krad/service/impl/PersistenceStructureServiceOjbImpl.java | Rice Implementation | 549 |
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."); } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/DocumentPresentationControllerBase.java | Rice KRAD Web Framework | 170 |
org/kuali/rice/krad/uif/authorization/DocumentPresentationControllerBase.java | Rice KRAD Web Framework | 242 |
} // 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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/web/WebRuleBaseValues.java | Rice Implementation | 86 |
org/kuali/rice/kew/rule/web/WebRuleBaseValues.java | Rice Implementation | 192 |
public void loadFieldsWithDefaultValues() { fields.clear(); if (getRuleTemplateId() != null) { RuleTemplateBo ruleTemplate = getRuleTemplateService().findByRuleTemplateId(getRuleTemplateId()); if (ruleTemplate != null) { List ruleTemplateAttributes = ruleTemplate.getActiveRuleTemplateAttributes(); Collections.sort(ruleTemplateAttributes); for (Iterator iter = ruleTemplateAttributes.iterator(); iter.hasNext();) { RuleTemplateAttributeBo ruleTemplateAttribute = (RuleTemplateAttributeBo) 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)) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 435 |
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.java | Rice Implementation | 281 |
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; |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 631 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 547 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 1117 |
org/kuali/rice/kim/service/impl/LdapUiDocumentServiceImpl.java | Rice LDAP Connector | 314 |
} 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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/document/Document.java | Rice KEW API | 175 |
org/kuali/rice/kew/api/document/Document.java | Rice KEW API | 330 |
} @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; |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/responsibility/ResponsibilityAction.java | Rice KIM API | 127 |
org/kuali/rice/kim/api/responsibility/ResponsibilityAction.java | Rice KIM API | 285 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 950 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 959 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/xml/export/RuleDelegationXmlExporter.java | Rice Implementation | 76 |
org/kuali/rice/kew/xml/export/RuleXmlExporter.java | Rice Implementation | 208 |
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.isUsingPrincipal()) { 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()); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 427 |
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 390 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/web/struts/action/IdentityManagementGroupDocumentAction.java | Rice Implementation | 204 |
org/kuali/rice/kim/web/struts/action/IdentityManagementRoleDocumentAction.java | Rice Implementation | 296 |
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) && |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.java | Rice Implementation | 55 |
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.java | Rice Implementation | 323 |
} /** * * @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."); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/impl/permission/PermissionInquirableImpl.java | Rice Implementation | 57 |
org/kuali/rice/kim/impl/responsibility/ResponsibilityInquirableImpl.java | Rice Implementation | 53 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/identity/address/EntityAddress.java | Rice KIM API | 207 |
org/kuali/rice/kim/api/identity/address/EntityAddress.java | Rice KIM API | 405 |
} @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 getStateProvinceCodeUnmasked() { return this.stateProvinceCodeUnmasked; } @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) { |
File | Project | Line |
---|---|---|
edu/sampleu/travel/krad/form/UILayoutTestForm.java | Rice Sample App | 208 |
edu/sampleu/travel/krad/form/UITestForm.java | Rice Sample App | 88 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/web/struts/form/LookupForm.java | Rice KNS | 246 |
org/kuali/rice/kns/web/struts/form/LookupForm.java | Rice KNS | 276 |
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())); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewAttributeDefinition.java | Rice KEW API | 38 |
org/kuali/rice/krms/api/repository/type/KrmsAttributeDefinition.java | Rice KRMS API | 38 |
public final class KrmsAttributeDefinition extends AbstractDataTransferObject implements KrmsAttributeDefinitionContract { private static final long serialVersionUID = -6356968810972165031L; @XmlElement(name = Elements.ID, required=true) private final String id; @XmlElement(name = Elements.NAME, required=true) private final String name; @XmlElement(name = Elements.NAMESPACE, required=true) private final String namespace; @XmlElement(name = Elements.LABEL, required=false) private final String label; @XmlElement(name = Elements.DESCRIPTION, required=false) private final String description; @XmlElement(name = Elements.ACTIVE, required=false) private final boolean active; @XmlElement(name = Elements.COMPONENT_NAME, required=false) private final String componentName; @XmlElement(name = CoreConstants.CommonElements.VERSION_NUMBER, required = false) private final Long versionNumber; @SuppressWarnings("unused") @XmlAnyElement private final Collection<org.w3c.dom.Element> _futureElements = null; /** * This constructor should never be called. It is only present for use during JAXB unmarshalling. */ private KrmsAttributeDefinition() { |
File | Project | Line |
---|---|---|
edu/sampleu/travel/krad/controller/UIComponentsTestController.java | Rice Sample App | 40 |
edu/sampleu/travel/krad/controller/UILayoutTestController.java | Rice Sample App | 39 |
public class UILayoutTestController extends UifControllerBase { @Override protected Class<UILayoutTestForm> formType() { return UILayoutTestForm.class; } @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"); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewAttributeDefinition.java | Rice KEW API | 82 |
org/kuali/rice/krms/api/repository/type/KrmsAttributeDefinition.java | Rice KRMS API | 82 |
private KrmsAttributeDefinition(Builder builder) { this.id = builder.getId(); this.name = builder.getName(); this.namespace = builder.getNamespace(); this.label = builder.getLabel(); this.description = builder.getDescription(); this.active = builder.isActive(); this.componentName = builder.getComponentName(); this.versionNumber = builder.getVersionNumber(); } public String getId() { return this.id; } public String getName() { return this.name; } public String getNamespace() { return this.namespace; } public String getLabel() { return this.label; } public String getDescription() { return description; } public boolean isActive() { return this.active; } public String getComponentName() { return this.componentName; } @Override public Long getVersionNumber() { return versionNumber; } /** * This builder is used to construct instances of KrmsAttributeDefinition. It enforces the constraints of the {@link KrmsAttributeDefinitionContract}. */ public static class Builder implements KrmsAttributeDefinitionContract, ModelBuilder, Serializable { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/permission/Permission.java | Rice KIM API | 124 |
org/kuali/rice/kim/api/responsibility/Responsibility.java | Rice KIM API | 123 |
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 { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/service/impl/RuleDelegationServiceImpl.java | Rice Implementation | 90 |
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.java | Rice Implementation | 654 |
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"); } RuleTemplateBo ruleTemplate = getRuleTemplateService().findByRuleTemplateName(ruleTemplateName); String ruleTemplateId = null; if (ruleTemplate != null) { ruleTemplateId = ruleTemplate.getId(); } 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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 676 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 727 |
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; |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/routeheader/dao/impl/DocumentRouteHeaderDAOOjbImpl.java | Rice Implementation | 227 |
org/kuali/rice/kew/routeheader/dao/impl/DocumentRouteHeaderDAOOjbImpl.java | Rice Implementation | 299 |
} } 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; |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/stats/dao/impl/StatsDAOOjbImpl.java | Rice Implementation | 95 |
org/kuali/rice/kew/stats/dao/impl/StatsDaoJpaImpl.java | Rice Implementation | 67 |
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); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 471 |
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.java | Rice Implementation | 281 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.java | Rice Implementation | 309 |
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.java | Rice Implementation | 333 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/criteria/InPredicate.java | Rice Core API | 87 |
org/kuali/rice/core/api/criteria/NotInPredicate.java | Rice Core API | 87 |
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"; |
File | Project | Line |
---|---|---|
org/kuali/rice/devtools/generators/jpa/JpaToDdl.java | Rice Development Tools | 157 |
org/kuali/rice/devtools/generators/jpa/JpaToOjbMetadata.java | Rice Development Tools | 184 |
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 ""; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/util/OjbCollectionHelper.java | Rice Implementation | 39 |
org/kuali/rice/krad/util/OjbCollectionHelper.java | Rice Implementation | 80 |
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 } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/stats/web/StatsForm.java | Rice Implementation | 41 |
edu/sampleu/kew/krad/form/StatsForm.java | Rice Sample App | 38 |
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(); } |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/UserPreferencesController.java | Rice Implementation | 145 |
org/kuali/rice/ken/web/spring/UserPreferencesController.java | Rice Implementation | 188 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/uif/RemotableCheckboxGroup.java | Rice Core API | 45 |
org/kuali/rice/core/api/uif/RemotableRadioButtonGroup.java | Rice Core API | 45 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 523 |
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.java | Rice Implementation | 329 |
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(); |
File | Project | Line |
---|---|---|
org/kuali/rice/shareddata/api/county/County.java | Rice Shared Data API | 173 |
org/kuali/rice/shareddata/api/state/State.java | Rice Shared Data API | 164 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/bo/authorization/BusinessObjectAuthorizerBase.java | Rice KRAD Web Framework | 161 |
org/kuali/rice/krad/uif/authorization/AuthorizerBase.java | Rice KRAD Web Framework | 168 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/rule/RuleReportCriteria.java | Rice KEW API | 101 |
org/kuali/rice/kew/api/rule/RuleReportCriteria.java | Rice KEW API | 209 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewTypeAttribute.java | Rice KEW API | 161 |
org/kuali/rice/krms/api/repository/type/KrmsTypeAttribute.java | Rice KRMS API | 161 |
KrmsAttributeDefinition.Builder.create(contract.getAttributeDefinition()); builder.setAttributeDefinition(attrBuilder); } 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 not 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 setTypeId(String typeId) { if (null != typeId && StringUtils.isBlank(typeId)) { throw new IllegalArgumentException("typeId must be null or non-blank"); } this.typeId = typeId; } public void setAttributeDefinitionId(String attributeDefinitionId) { if (StringUtils.isBlank(attributeDefinitionId)) { throw new IllegalArgumentException("the attribute definition id is blank"); } this.attributeDefinitionId = attributeDefinitionId; } public void setSequenceNumber(Integer sequenceNumber) { if (sequenceNumber == null){ throw new IllegalArgumentException("the sequence number is null"); } this.sequenceNumber = sequenceNumber; } public void setAttributeDefinition(KrmsAttributeDefinition.Builder attributeDefinition) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceStructureServiceJpaImpl.java | Rice Implementation | 595 |
org/kuali/rice/krad/service/impl/PersistenceStructureServiceOjbImpl.java | Rice Implementation | 636 |
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) { |
File | Project | Line |
---|---|---|
edu/sampleu/bookstore/document/web/BookOrderAction.java | Rice Sample App | 29 |
edu/sampleu/bookstore/document/web/BookOrderAction.java | Rice Sample App | 67 |
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)); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/engine/node/KRAMetaRuleNode.java | Rice Implementation | 186 |
org/kuali/rice/kew/engine/node/RequestsNode.java | Rice Implementation | 208 |
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 ); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToOneDescriptor.java | Rice Core Framework | 38 |
org/kuali/rice/core/framework/persistence/jpa/metadata/OneToOneDescriptor.java | Rice Core Framework | 53 |
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(); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewTypeDefinition.java | Rice KEW API | 197 |
org/kuali/rice/krms/api/repository/type/KrmsTypeDefinition.java | Rice KRMS API | 197 |
KrmsTypeAttribute.Builder.create(attr); attrBuilderList.add(myBuilder); } } builder.setAttributes(attrBuilderList); 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 not be blank * @throws IllegalArgumentException if the id is blank */ public void setId(String id) { if (id != null && StringUtils.isBlank(id)) { throw new IllegalArgumentException("id is 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 setServiceName(String serviceName) { this.serviceName = serviceName; } public void setAttributes(List<KrmsTypeAttribute.Builder> attributes){ |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/bo/ui/KimDocumentRoleResponsibilityAction.java | Rice Implementation | 99 |
org/kuali/rice/kim/bo/role/dto/RoleResponsibilityActionInfo.java | Rice KIM API | 37 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/document/RoutingRuleDelegationMaintainable.java | Rice Implementation | 100 |
org/kuali/rice/kew/document/RoutingRuleMaintainable.java | Rice Implementation | 88 |
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).getId()); getNewRule(document).setDocumentId(document.getDocumentHeader().getDocumentNumber()); super.processAfterEdit(document, parameters); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/attribute/XMLAttributeUtils.java | Rice Implementation | 53 |
org/kuali/rice/kew/attribute/XMLAttributeUtils.java | Rice Implementation | 90 |
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); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/criteria/EqualPredicate.java | Rice Core API | 46 |
org/kuali/rice/core/api/criteria/NotEqualPredicate.java | Rice Core API | 46 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/config/ThinClientResourceLoader.java | Rice Implementation | 231 |
org/kuali/rice/ksb/messaging/serviceconnectors/HttpInvokerConnector.java | Rice Implementation | 137 |
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(); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actionrequest/dao/impl/ActionRequestDAOJpaImpl.java | Rice Implementation | 246 |
org/kuali/rice/kew/actionrequest/dao/impl/ActionRequestDAOOjbImpl.java | Rice Implementation | 97 |
} 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 { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.java | Rice Implementation | 470 |
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.java | Rice Implementation | 601 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/core/web/component/ComponentInquirableImpl.java | Rice Core Web | 42 |
org/kuali/rice/core/web/component/ComponentInquirableImpl.java | Rice Core Web | 82 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.java | Rice Implementation | 145 |
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.java | Rice Implementation | 192 |
} /** * @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(); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.java | Rice Implementation | 411 |
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.java | Rice Implementation | 138 |
} 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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/engine/StandardWorkflowEngine.java | Rice Implementation | 376 |
org/kuali/rice/kew/engine/simulation/SimulationEngine.java | Rice Implementation | 586 |
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()); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/type/HibernateKualiIntegerPercentFieldType.java | Rice Core Framework | 46 |
org/kuali/rice/core/framework/persistence/jpa/type/HibernateKualiPercentFieldType.java | Rice Core Framework | 48 |
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 }; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 324 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 201 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.java | Rice Implementation | 162 |
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.java | Rice Implementation | 253 |
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.getId(), rule); RuleBaseValues oldRule = rule.getPreviousVersion(); if (oldRule != null) { performanceLogger.log("Setting previous rule: " + oldRule.getId() + " to non current."); oldRule.setCurrentInd(Boolean.FALSE); oldRule.setDeactivationDate(date); rulesToSave.put(oldRule.getId(), oldRule); |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/web/controller/UifControllerBase.java | Rice KRAD Web Framework | 542 |
org/kuali/rice/krad/web/controller/UifControllerBase.java | Rice KRAD Web Framework | 588 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/criteria/InPredicate.java | Rice Core API | 53 |
org/kuali/rice/core/api/criteria/NotInPredicate.java | Rice Core API | 53 |
@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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 169 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 122 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.java | Rice Core Framework | 110 |
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.java | Rice Core Framework | 163 |
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()); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/dto/package-info.java | Rice API | 17 |
org/kuali/rice/kew/service/impl/package-info.java | Rice Implementation | 17 |
@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) }) |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/web/struts/action/KualiLookupAction.java | Rice KNS | 266 |
org/kuali/rice/kns/web/struts/action/KualiLookupAction.java | Rice KNS | 296 |
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())); } |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.java | Rice Implementation | 183 |
org/kuali/rice/ken/web/spring/SendNotificationMessageController.java | Rice Implementation | 189 |
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")); |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.java | Rice Core Framework | 53 |
org/kuali/rice/core/framework/persistence/jpa/metadata/OneToOneDescriptor.java | Rice Core Framework | 51 |
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(" } "); } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.java | Rice KRAD Web Framework | 683 |
org/kuali/rice/krms/impl/rule/AgendaEditorBusRule.java | Rice KRMS Impl | 52 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/criteria/InIgnoreCasePredicate.java | Rice Core API | 84 |
org/kuali/rice/core/api/criteria/NotInIgnoreCasePredicate.java | Rice Core API | 84 |
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"; |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actions/ActionRegistryImpl.java | Rice Implementation | 135 |
org/kuali/rice/kew/actions/ActionRegistryImpl.java | Rice Implementation | 158 |
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))) { |
File | Project | Line |
---|---|---|
org/kuali/rice/edl/impl/components/NetworkIdWorkflowEDLConfigComponent.java | Rice EDL Impl | 36 |
org/kuali/rice/edl/impl/components/UniversityIdWorkflowEDLConfigComponent.java | Rice EDL Impl | 37 |
@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"); |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.java | Rice Core Framework | 55 |
org/kuali/rice/core/framework/persistence/jpa/metadata/ObjectDescriptor.java | Rice Core Framework | 126 |
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(" } "); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/impl/permission/PermissionServiceImpl.java | Rice KIM Impl | 335 |
org/kuali/rice/kim/impl/permission/PermissionServiceImpl.java | Rice KIM Impl | 358 |
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 |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 564 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 449 |
} /** * @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()); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actions/ApproveAction.java | Rice Implementation | 94 |
org/kuali/rice/kew/actions/CompleteAction.java | Rice Implementation | 93 |
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 { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 382 |
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 345 |
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.getId()).append("\">return value</a>"); record.setReturnUrl(returnUrl.toString()); String destinationUrl = "<a href=\"Rule.do?methodToCall=report¤tRuleId=" + record.getId() + "\">report</a>"; record.setDestinationUrl(destinationUrl); displayList.add(ruleDelegation); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/doctype/bo/DocumentType.java | Rice Implementation | 950 |
org/kuali/rice/kew/doctype/bo/DocumentType.java | Rice Implementation | 976 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 528 |
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 490 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/datadictionary/validation/charlevel/CharsetValidationPattern.java | Rice KNS | 29 |
org/kuali/rice/krad/datadictionary/validation/constraint/CharsetPatternConstraint.java | Rice KRAD Web Framework | 32 |
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(); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 1423 |
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 2417 |
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, |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 401 |
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 1942 |
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())); |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 62 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 171 |
@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 = |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewTypeAttribute.java | Rice KEW API | 73 |
org/kuali/rice/krms/api/repository/type/KrmsTypeAttribute.java | Rice KRMS API | 73 |
private KrmsTypeAttribute(Builder builder) { this.id = builder.getId(); this.typeId = builder.getTypeId(); this.attributeDefinitionId = builder.getAttributeDefinitionId(); this.sequenceNumber = builder.getSequenceNumber(); this.active = builder.isActive(); if (builder.getAttributeDefinition() != null) { this.attributeDefinition = builder.getAttributeDefinition().build(); } } public String getId() { return this.id; } public String getTypeId() { return this.typeId; } public String getAttributeDefinitionId() { return this.attributeDefinitionId; } public Integer getSequenceNumber() { return this.sequenceNumber; } public boolean isActive() { return this.active; } public KrmsAttributeDefinition getAttributeDefinition() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/web/struts/action/KualiDocumentActionBase.java | Rice KNS | 628 |
org/kuali/rice/krad/web/controller/DocumentControllerBase.java | Rice KRAD Web Framework | 555 |
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)) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/web/struts/action/KualiAction.java | Rice KNS | 880 |
org/kuali/rice/krad/web/controller/UifControllerBase.java | Rice KRAD Web Framework | 169 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.java | Rice Implementation | 221 |
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.java | Rice Implementation | 241 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/criteria/GreaterThanOrEqualPredicate.java | Rice Core API | 46 |
org/kuali/rice/core/api/criteria/GreaterThanPredicate.java | Rice Core API | 46 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewAttributeDefinition.java | Rice KEW API | 129 |
org/kuali/rice/krms/api/repository/type/KrmsAttributeDefinition.java | Rice KRMS API | 129 |
public static class Builder implements KrmsAttributeDefinitionContract, ModelBuilder, Serializable { private static final long serialVersionUID = -2110564370088779631L; private String id; private String name; private String namespace; private String label; private String description; private boolean active; private String componentName; private Long versionNumber; /** * Private constructor for creating a builder with all of it's required attributes. */ private Builder(String id, String name, String namespace) { setId(id); setName(name); setNamespace(namespace); setActive(true); } public Builder label(String label){ setLabel(label); return this; } public Builder componentName(String componentName){ setComponentName(componentName); return this; } /** * Creates a builder from the given parameters. * * @param id the KrmsAttributeDefinition id * @param name the KrmsAttributeDefinition name * @param namespace the KrmsAttributeDefinition namespace * @return an instance of the builder with the fields already populated * @throws IllegalArgumentException if the either the id, name or namespace is null or blank */ public static Builder create(String id, String name, String namespace) { return new Builder(id, name, namespace); } /** * Creates a builder by populating it with data from the given {@link KrmsAttributeDefinitionContract}. * * @param contract the contract from which to populate this builder * @return an instance of the builder populated with data from the contract */ public static Builder create(KrmsAttributeDefinitionContract contract) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/util/ObjectUtils.java | Rice KRAD Web Framework | 515 |
org/kuali/rice/krad/util/ObjectUtils.java | Rice KRAD Web Framework | 557 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/uif/view/History.java | Rice KRAD Web Framework | 200 |
org/kuali/rice/krad/uif/view/History.java | Rice KRAD Web Framework | 233 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/identity/employment/EntityEmployment.java | Rice KIM API | 128 |
org/kuali/rice/kim/api/identity/employment/EntityEmployment.java | Rice KIM API | 250 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/role/service/impl/RoleServiceImpl.java | Rice Implementation | 109 |
org/kuali/rice/kew/role/service/impl/RoleServiceImpl.java | Rice Implementation | 147 |
deletePendingRoleRequests(routeHeader.getDocumentId(), roleName, null); for (Iterator nodeIt = nodeInstances.iterator(); nodeIt.hasNext();) { RouteNodeInstance nodeInstance = (RouteNodeInstance)nodeIt.next(); RuleTemplateBo 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())) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actions/CancelAction.java | Rice Implementation | 79 |
org/kuali/rice/kew/actions/DisapproveAction.java | Rice Implementation | 94 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/devtools/generators/jpa/JpaToDdl.java | Rice Development Tools | 137 |
org/kuali/rice/devtools/generators/jpa/JpaToOjbMetadata.java | Rice Development Tools | 128 |
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 ); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.java | Rice Implementation | 102 |
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.java | Rice Implementation | 378 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/docsearch/SearchableAttributeFloatValue.java | Rice Implementation | 238 |
org/kuali/rice/kew/docsearch/SearchableAttributeLongValue.java | Rice Implementation | 232 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/util/FieldUtils.java | Rice KNS | 619 |
org/kuali/rice/kns/web/ui/SectionBridge.java | Rice KNS | 696 |
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 ); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/extension/ExtensionDefinition.java | Rice KEW API | 108 |
org/kuali/rice/kew/api/extension/ExtensionDefinition.java | Rice KEW API | 198 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/impl/permission/PermissionInquirableImpl.java | Rice Implementation | 83 |
org/kuali/rice/kim/impl/responsibility/ResponsibilityInquirableImpl.java | Rice Implementation | 79 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/engine/node/IteratedRequestActivationNode.java | Rice Implementation | 274 |
org/kuali/rice/kew/engine/node/RequestActivationNode.java | Rice Implementation | 182 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/uif/RemotableAttributeLookupSettings.java | Rice Core API | 95 |
org/kuali/rice/core/api/uif/RemotableAttributeLookupSettings.java | Rice Core API | 193 |
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; } @Override public Boolean isCaseSensitive() { return caseSensitive; } public void setInCriteria(boolean inCriteria) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/doctype/RouteNode.java | Rice KEW API | 161 |
org/kuali/rice/kew/api/doctype/RouteNode.java | Rice KEW API | 310 |
} @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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jdbc/sql/SQLUtils.java | Rice Core Framework | 201 |
org/kuali/rice/core/framework/persistence/jdbc/sql/SQLUtils.java | Rice Core Framework | 221 |
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)) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/uif/service/impl/InquiryViewTypeServiceImpl.java | Rice Implementation | 51 |
org/kuali/rice/krad/uif/service/impl/LookupViewTypeServiceImpl.java | Rice Implementation | 51 |
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)); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/util/FieldUtils.java | Rice KNS | 980 |
org/kuali/rice/kns/util/FieldUtils.java | Rice KNS | 1000 |
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()); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/action/RoutingReportCriteria.java | Rice KEW API | 99 |
org/kuali/rice/kew/api/action/RoutingReportCriteria.java | Rice KEW API | 224 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/datadictionary/exporter/AttributesMapBuilder.java | Rice Implementation | 137 |
org/kuali/rice/kns/datadictionary/exporter/AttributesMapBuilder.java | Rice Implementation | 172 |
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()); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/util/WebUtils.java | Rice KNS | 661 |
org/kuali/rice/krad/util/KRADUtils.java | Rice KRAD Web Framework | 479 |
} /** * 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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/document/node/RouteNodeInstance.java | Rice KEW API | 143 |
org/kuali/rice/kew/api/document/node/RouteNodeInstance.java | Rice KEW API | 265 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/BusinessObjectDao.java | Rice Implementation | 154 |
org/kuali/rice/krad/service/BusinessObjectService.java | Rice KRAD Application Framework | 131 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/web/struts/action/KualiRequestProcessor.java | Rice Implementation | 530 |
org/kuali/rice/kns/web/struts/action/KualiRequestProcessor.java | Rice Implementation | 558 |
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); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/web/WebRuleBaseValues.java | Rice Implementation | 640 |
org/kuali/rice/kew/rule/web/WebRuleBaseValues.java | Rice Implementation | 660 |
public String getParentRuleId() { if (getDelegateRule().booleanValue()) { List ruleDelegations = getRuleDelegationService().findByDelegateRuleId(getId()); 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(); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 528 |
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.java | Rice Implementation | 375 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/document/RoutingRuleMaintainableBusRule.java | Rice Implementation | 226 |
org/kuali/rice/kew/rule/web/WebRuleUtils.java | Rice Implementation | 434 |
RuleTemplateBo ruleTemplate = KEWServiceLocator.getRuleTemplateService().findByRuleTemplateId(rule.getRuleTemplateId()); /** Populate rule extension values * */ List extensions = new ArrayList(); for (Iterator iterator = ruleTemplate.getActiveRuleTemplateAttributes().iterator(); iterator.hasNext();) { RuleTemplateAttributeBo ruleTemplateAttribute = (RuleTemplateAttributeBo) 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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.java | Rice Implementation | 564 |
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.java | Rice Implementation | 698 |
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(); } |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/ContentTypeController.java | Rice Implementation | 142 |
org/kuali/rice/ken/web/spring/ContentTypeController.java | Rice Implementation | 181 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.java | Rice Core Framework | 453 |
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.java | Rice Core Framework | 547 |
} //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)) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/IdentityManagementServiceImpl.java | Rice Client Contrib | 416 |
org/kuali/rice/kim/service/impl/IdentityManagementServiceImpl.java | Rice Client Contrib | 447 |
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" ); } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 312 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 189 |
} 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)) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 580 |
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.java | Rice Implementation | 377 |
} } 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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/platform/MySQLDatabasePlatform.java | Rice Core Framework | 62 |
org/kuali/rice/core/framework/persistence/platform/OracleDatabasePlatform.java | Rice Core Framework | 75 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/common/template/Template.java | Rice KIM API | 267 |
org/kuali/rice/kim/api/type/KimTypeAttribute.java | Rice KIM API | 208 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 295 |
org/kuali/rice/kew/rule/bo/RuleBaseValuesLookupableHelperServiceImpl.java | Rice Implementation | 312 |
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(); |
File | Project | Line |
---|---|---|
org/kuali/rice/edl/impl/components/GlobalAttributeComponent.java | Rice EDL Impl | 74 |
org/kuali/rice/edl/impl/components/GlobalAttributeComponent.java | Rice EDL Impl | 106 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.java | Rice Core Framework | 57 |
org/kuali/rice/core/framework/persistence/jpa/metadata/ManyToManyDescriptor.java | Rice Core Framework | 70 |
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(" } "); } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/datadictionary/validation/constraint/FloatingPointPatternConstraint.java | Rice KRAD Web Framework | 44 |
org/kuali/rice/krad/datadictionary/validation/constraint/IntegerPatternConstraint.java | Rice KRAD Web Framework | 43 |
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; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/impl/role/RoleServiceImpl.java | Rice KIM Impl | 140 |
org/kuali/rice/kim/impl/role/RoleServiceImpl.java | Rice KIM Impl | 210 |
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)) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/impl/type/IdentityManagementTypeAttributeTransactionalDocument.java | Rice Implementation | 83 |
org/kuali/rice/kim/impl/type/KimTypeAttributesHelper.java | Rice Implementation | 88 |
} 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){ |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.java | Rice Implementation | 348 |
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.java | Rice Implementation | 278 |
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("active", 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()) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/ldap/EntityDefaultMapper.java | Rice LDAP Connector | 50 |
org/kuali/rice/kim/ldap/EntityMapper.java | Rice LDAP Connector | 54 |
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>()); |
File | Project | Line |
---|---|---|
org/kuali/rice/ksb/api/registry/ServiceInfo.java | Rice KSB API | 124 |
org/kuali/rice/ksb/api/registry/ServiceInfo.java | Rice KSB API | 238 |
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; |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 438 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 336 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/ldap/EntityTypeContactInfoDefaultMapper.java | Rice LDAP Connector | 53 |
org/kuali/rice/kim/ldap/EntityTypeContactInfoMapper.java | Rice LDAP Connector | 64 |
} /** * 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; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/util/documentserializer/DocumentSerializationState.java | Rice KRAD Web Framework | 50 |
org/kuali/rice/krad/util/documentserializer/SerializationState.java | Rice KRAD Web Framework | 51 |
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(); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/identity/email/EntityEmail.java | Rice KIM API | 238 |
org/kuali/rice/kim/api/identity/phone/EntityPhone.java | Rice KIM API | 358 |
} @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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 432 |
org/kuali/rice/kim/service/impl/UiDocumentServiceImpl.java | Rice Implementation | 1980 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/role/service/impl/RouteLogDerivedRoleTypeServiceImpl.java | Rice Implementation | 90 |
org/kuali/rice/krad/authorization/PermissionDerivedRoleTypeServiceImpl.java | Rice Implementation | 80 |
} } 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"); } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jdbc/sql/SqlBuilder.java | Rice Core Framework | 258 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 551 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceServiceImpl.java | Rice Implementation | 89 |
org/kuali/rice/krad/service/impl/PersistenceServiceOjbImpl.java | Rice Implementation | 168 |
} /** * @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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/MaintenanceDocumentAuthorizerBase.java | Rice Implementation | 42 |
org/kuali/rice/krad/uif/authorization/MaintenanceDocumentAuthorizerBase.java | Rice KRAD Web Framework | 39 |
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, |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 357 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 279 |
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) ) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/web/struts/action/KualiDocumentActionBase.java | Rice KNS | 364 |
org/kuali/rice/krad/web/controller/DocumentControllerBase.java | Rice KRAD Web Framework | 150 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/rule/RuleResponsibility.java | Rice KEW API | 122 |
org/kuali/rice/kew/api/rule/RuleResponsibility.java | Rice KEW API | 266 |
return new RuleResponsibility(this); } @Override public String getId() { return this.id; } @Override public Integer getPriority() { return this.priority; } @Override public String getResponsibilityId() { return this.responsibilityId; } @Override public String getActionRequestedCd() { return this.actionRequestedCd; } @Override public String getApprovePolicy() { return this.approvePolicy; } @Override public String getPrincipalId() { return this.principalId; } @Override public String getGroupId() { return this.groupId; } @Override public String getRoleName() { return this.roleName; } @Override public List<RuleDelegation.Builder> getDelegationRules() { |
File | Project | Line |
---|---|---|
org/kuali/rice/core/web/parameter/ParameterLookupableHelperServiceImpl.java | Rice Core Web | 64 |
org/kuali/rice/core/web/parameter/ParameterRule.java | Rice Core Web | 67 |
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()); |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/impl/ui/AgendaEditorController.java | Rice KRMS Impl | 594 |
org/kuali/rice/krms/impl/ui/RuleEditorController.java | Rice KRMS Impl | 650 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/document/authorization/DocumentAuthorizerBase.java | Rice KRAD Web Framework | 171 |
org/kuali/rice/krad/uif/authorization/DocumentAuthorizerBase.java | Rice KRAD Web Framework | 154 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/bo/authorization/BusinessObjectAuthorizerBase.java | Rice KRAD Web Framework | 243 |
org/kuali/rice/krad/uif/authorization/AuthorizerBase.java | Rice KRAD Web Framework | 225 |
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; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/maintenance/KualiMaintainableImpl.java | Rice KNS | 1363 |
org/kuali/rice/kns/util/FieldUtils.java | Rice KNS | 784 |
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); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewTypeDefinition.java | Rice KEW API | 89 |
org/kuali/rice/krms/api/repository/type/KrmsTypeDefinition.java | Rice KRMS API | 89 |
for (KrmsTypeAttribute.Builder b : builder.attributes){ attrList.add(b.build()); } } this.attributes = Collections.unmodifiableList(attrList); this.versionNumber = builder.getVersionNumber(); } @Override public String getId() { return this.id; } @Override public String getName() { return this.name; } @Override public String getNamespace() { return this.namespace; } @Override public String getServiceName() { return this.serviceName; } @Override public boolean isActive() { return this.active; } @Override public List<KrmsTypeAttribute> getAttributes() { |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/uif/service/impl/InquiryViewTypeServiceImpl.java | Rice Implementation | 59 |
org/kuali/rice/krad/uif/service/impl/MaintenanceViewTypeServiceImpl.java | Rice Implementation | 77 |
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)) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actions/ApproveAction.java | Rice Implementation | 157 |
org/kuali/rice/kew/actions/CompleteAction.java | Rice Implementation | 151 |
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()); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/role/PassThruRoleTypeServiceBase.java | Rice Client Contrib | 63 |
org/kuali/rice/krad/authorization/PermissionDerivedRoleTypeServiceImpl.java | Rice Implementation | 83 |
} @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)); |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/uif/service/impl/LookupViewTypeServiceImpl.java | Rice Implementation | 59 |
org/kuali/rice/krad/uif/service/impl/MaintenanceViewTypeServiceImpl.java | Rice Implementation | 77 |
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)); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/role/PassThruRoleTypeServiceBase.java | Rice Client Contrib | 63 |
org/kuali/rice/kim/service/support/impl/PrincipalDerivedRoleTypeServiceImpl.java | Rice Implementation | 78 |
} @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"); } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 284 |
org/kuali/rice/krad/util/ObjectUtils.java | Rice KRAD Web Framework | 1093 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.java | Rice Implementation | 87 |
org/kuali/rice/kew/rule/dao/impl/RuleDelegationDAOOjbImpl.java | Rice Implementation | 118 |
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, |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/engine/node/RouteNodeUtils.java | Rice Implementation | 123 |
org/kuali/rice/kew/engine/node/service/impl/RouteNodeServiceImpl.java | Rice Implementation | 236 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/impl/permission/PermissionServiceImpl.java | Rice KIM Impl | 185 |
org/kuali/rice/kim/impl/permission/PermissionServiceImpl.java | Rice KIM Impl | 235 |
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 ); |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/dao/impl/LookupDaoJpa.java | Rice Implementation | 409 |
org/kuali/rice/krad/dao/impl/LookupDaoOjb.java | Rice Implementation | 314 |
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); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/docsearch/xml/StandardGenericXMLSearchableAttribute.java | Rice Implementation | 101 |
org/kuali/rice/kew/docsearch/xml/StandardGenericXMLSearchableAttribute.java | Rice Implementation | 117 |
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()))) { |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.java | Rice Core Framework | 472 |
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.java | Rice Core Framework | 567 |
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()); |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/api/repository/category/CategoryDefinition.java | Rice KRMS API | 129 |
org/kuali/rice/krms/api/repository/type/KrmsAttributeDefinition.java | Rice KRMS API | 187 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/identity/privacy/EntityPrivacyPreferences.java | Rice KIM API | 77 |
org/kuali/rice/kim/api/identity/privacy/EntityPrivacyPreferences.java | Rice KIM API | 162 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewAttributeDefinition.java | Rice KEW API | 187 |
org/kuali/rice/krms/api/repository/category/CategoryDefinition.java | Rice KRMS API | 129 |
builder.setVersionNumber(category.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; } /** * Sets the name for the category definition that will be returned by this builder. * The name must not be null or blank. * * @param name the name to set on this builder, must not be null or blank * * @throws IllegalArgumentException if the given name is null or blank */ public void setName(String name) { if (StringUtils.isBlank(name)) { throw new IllegalArgumentException("name is blank"); } this.name = name; } /** * Sets the namespace code for the category definition that will be returned by this builder. * The namespace must not be null or blank. * * @param namespace the namespace code to set on this builder, must not be null or blank * * @throws IllegalArgumentException if the given namespace is null or blank */ public void setNamespace(String namespace) { if (StringUtils.isBlank(namespace)) { throw new IllegalArgumentException("namespace is blank"); } this.namespace = namespace; } public void setVersionNumber(Long versionNumber){ |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/role/PassThruRoleTypeServiceBase.java | Rice Client Contrib | 63 |
org/kuali/rice/kns/kim/role/RoleTypeServiceBase.java | Rice KNS | 104 |
} /** * 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"); |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/identity/affiliation/EntityAffiliation.java | Rice KIM API | 41 |
org/kuali/rice/kim/api/identity/name/EntityName.java | Rice KIM API | 86 |
@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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/ksb/messaging/web/KSBAction.java | Rice Implementation | 110 |
org/kuali/rice/kns/web/struts/action/KualiAction.java | Rice KNS | 872 |
} /** * 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(), |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/dao/impl/RuleDAOJpaImpl.java | Rice Implementation | 169 |
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.java | Rice Implementation | 169 |
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(); |
File | Project | Line |
---|---|---|
org/kuali/rice/kcb/config/KCBInitializer.java | Rice Implementation | 80 |
org/kuali/rice/kew/mail/service/impl/ActionListEmailServiceImpl.java | Rice Implementation | 596 |
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); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.java | Rice Core Framework | 455 |
org/kuali/rice/core/framework/persistence/jpa/metadata/MetadataManager.java | Rice Core Framework | 601 |
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()); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/core/api/parameter/ParameterType.java | Rice Core API | 57 |
org/kuali/rice/shareddata/api/campus/CampusType.java | Rice Shared Data API | 56 |
@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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewTypeDefinition.java | Rice KEW API | 40 |
org/kuali/rice/krms/api/repository/type/KrmsTypeDefinition.java | Rice KRMS API | 40 |
public final class KrmsTypeDefinition extends AbstractDataTransferObject implements KrmsTypeDefinitionContract{ private static final long serialVersionUID = -8314397393380856301L; @XmlElement(name = Elements.ID, required=true) private String id; @XmlElement(name = Elements.NAME, required=true) private String name; @XmlElement(name = Elements.NAMESPACE, required=true) private String namespace; @XmlElement(name = Elements.SERVICENAME, required=false) private String serviceName; @XmlElement(name = Elements.ACTIVE, required=false) private boolean active; @XmlElement(name = Elements.ATTRIBUTE, required=false) private List<KrmsTypeAttribute> attributes; |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/PersistenceServiceImpl.java | Rice Implementation | 89 |
org/kuali/rice/krad/service/impl/PersistenceServiceJpaImpl.java | Rice Implementation | 256 |
} /** * @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); } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.java | Rice Implementation | 169 |
org/kuali/rice/kew/rule/dao/impl/RuleDAOOjbImpl.java | Rice Implementation | 194 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/notes/CustomNoteAttributeImpl.java | Rice Implementation | 28 |
org/kuali/rice/kew/notes/WorkflowNoteAttributeImpl.java | Rice Implementation | 28 |
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; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/SendEventNotificationMessageController.java | Rice Implementation | 563 |
org/kuali/rice/ken/web/spring/SendNotificationMessageController.java | Rice Implementation | 523 |
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."); |
File | Project | Line |
---|---|---|
org/kuali/rice/edl/framework/extract/FieldDTO.java | Rice EDL Framework | 31 |
org/kuali/rice/edl/impl/extract/Fields.java | Rice EDL Impl | 78 |
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; } |
File | Project | Line |
---|---|---|
org/kuali/rice/krms/api/engine/TermResolutionException.java | Rice KRMS API | 59 |
org/kuali/rice/krms/api/engine/TermResolutionException.java | Rice KRMS API | 79 |
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; } } |
File | Project | Line |
---|---|---|
org/kuali/rice/krad/service/impl/MaintenanceDocumentServiceImpl.java | Rice Implementation | 174 |
org/kuali/rice/kns/web/struts/action/KualiMaintenanceDocumentAction.java | Rice KNS | 293 |
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() ); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/docsearch/SearchableAttributeDateTimeValue.java | Rice Implementation | 215 |
org/kuali/rice/kew/docsearch/SearchableAttributeLongValue.java | Rice Implementation | 233 |
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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOJpaImpl.java | Rice Implementation | 217 |
org/kuali/rice/kew/actionlist/dao/impl/ActionListDAOOjbImpl.java | Rice Implementation | 127 |
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 + "%"); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/api/repository/type/KewTypeAttribute.java | Rice KEW API | 35 |
org/kuali/rice/krms/api/repository/type/KrmsTypeAttribute.java | Rice KRMS API | 35 |
public final class KrmsTypeAttribute extends AbstractDataTransferObject implements KrmsTypeAttributeContract { private static final long serialVersionUID = -304265575559412478L; @XmlElement(name = Elements.ID, required=true) private String id; @XmlElement(name = Elements.TYPE_ID, required=true) private String typeId; @XmlElement(name = Elements.ATTR_DEFN_ID, required=true) private String attributeDefinitionId; @XmlElement(name = Elements.SEQ_NO, required=true) private Integer sequenceNumber; @XmlElement(name = Elements.ACTIVE, required=false) private boolean active; @XmlElement(name = Elements.ATTR_DEFN, required=false) private KrmsAttributeDefinition attributeDefinition; |
File | Project | Line |
---|---|---|
edu/sampleu/travel/krad/form/UILayoutTestForm.java | Rice Sample App | 214 |
edu/sampleu/travel/krad/form/UITestListObject.java | Rice Sample App | 52 |
} /** * @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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.java | Rice Implementation | 148 |
org/kuali/rice/kew/rule/service/impl/RuleServiceImpl.java | Rice Implementation | 238 |
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()); |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/bo/RuleDelegationLookupableHelperServiceImpl.java | Rice Implementation | 490 |
org/kuali/rice/kim/lookup/GroupLookupableHelperServiceImpl.java | Rice Implementation | 334 |
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(); |
File | Project | Line |
---|---|---|
org/kuali/rice/ken/web/spring/UserPreferencesController.java | Rice Implementation | 107 |
org/kuali/rice/ken/web/spring/UserPreferencesController.java | Rice Implementation | 145 |
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()); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kns/web/struts/action/KualiDocumentActionBase.java | Rice KNS | 1229 |
org/kuali/rice/kns/web/struts/action/KualiInquiryAction.java | Rice KNS | 411 |
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); } } } |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/identity/citizenship/EntityCitizenship.java | Rice KIM API | 97 |
org/kuali/rice/kim/api/identity/citizenship/EntityCitizenship.java | Rice KIM API | 189 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/identity/Type.java | Rice KIM API | 155 |
org/kuali/rice/kim/api/identity/external/EntityExternalIdentifierType.java | Rice KIM API | 170 |
} @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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/web/RoutingReportAction.java | Rice Implementation | 396 |
org/kuali/rice/kew/rule/web/RoutingReportAction.java | Rice Implementation | 414 |
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()); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/rule/dao/impl/RuleDAOJpaImpl.java | Rice Implementation | 169 |
org/kuali/rice/kew/rule/dao/impl/RuleDAOJpaImpl.java | Rice Implementation | 194 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/documentoperation/web/DocumentOperationAction.java | Rice Implementation | 356 |
org/kuali/rice/kew/documentoperation/web/DocumentOperationAction.java | Rice Implementation | 378 |
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()); } |
File | Project | Line |
---|---|---|
org/kuali/rice/kew/actions/ActionTakenEvent.java | Rice Implementation | 203 |
org/kuali/rice/kew/messaging/exceptionhandling/ExceptionRoutingServiceImpl.java | Rice Implementation | 133 |
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) { |
File | Project | Line |
---|---|---|
org/kuali/rice/core/impl/config/property/ConfigParserImpl.java | Rice Core Impl | 200 |
org/kuali/rice/core/impl/config/property/JAXBConfigImpl.java | Rice Core Impl | 513 |
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; |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/role/RoleResponsibility.java | Rice KIM API | 199 |
org/kuali/rice/kim/api/role/RoleResponsibilityAction.java | Rice KIM API | 275 |
} @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"; |
File | Project | Line |
---|---|---|
org/kuali/rice/kim/api/common/attribute/KimAttribute.java | Rice KIM API | 245 |
org/kuali/rice/kim/api/responsibility/Responsibility.java | Rice KIM API | 298 |
} @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() { |
File | Project | Line |
---|---|---|
org/kuali/rice/ksb/messaging/web/KSBAction.java | Rice Implementation | 112 |
org/kuali/rice/krad/web/controller/UifControllerBase.java | Rice KRAD Web Framework | 169 |
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(), |