now) * @param currVerNewState * this is the state that we need to set the current version to. * Set to null to not update the currVerCourse state. * @param makeCurrent * if true we'll set thisVerCourse as the current version. * @param prevEndTermAtpId * the end term for the previous version to end on * @throws Exception */ @Transactional(readOnly = false) private void updateCourseVersionStates(CourseInfo thisVerCourse, String thisVerNewState, CourseInfo currVerCourse, String currVerNewState, boolean makeCurrent, String prevEndTermAtpId) throws Exception { String thisVerPrevState = thisVerCourse.getState(); // if already current, will throw error if you try to make the current // version the current version. boolean isCurrent = thisVerCourse.getId().equals(currVerCourse.getId()); if(!makeCurrent || !isCurrent || !thisVerCourse.getVersionInfo().getSequenceNumber().equals(1)){ makeCurrent &= !isCurrent; } if (thisVerNewState == null) { throw new InvalidParameterException("new state cannot be null"); } else { thisVerCourse.setState(thisVerNewState); courseService.updateCourse(thisVerCourse); updateStatementTreeViewInfoState(thisVerCourse); } // won't get called if previous exception was thrown if (currVerNewState != null) { currVerCourse.setState(currVerNewState); if(currVerCourse.getEndTerm()==null){ currVerCourse.setEndTerm(prevEndTermAtpId); } courseService.updateCourse(currVerCourse); updateStatementTreeViewInfoState(currVerCourse); } if (makeCurrent == true) { courseService.setCurrentCourseVersion(thisVerCourse.getId(), null); } // for all draft and approved courses set the state to superseded. // we should only need to evaluated versions with sequence number // higher than previous active course. If the course you're // activating is the current course check all versions. if (thisVerPrevState.equals(DtoConstants.STATE_APPROVED) && thisVerNewState.equals(DtoConstants.STATE_ACTIVE)) { List versions = courseService.getVersions( CourseServiceConstants.COURSE_NAMESPACE_URI, thisVerCourse .getVersionInfo().getVersionIndId()); Long startSeq = new Long(1); if (!isCurrent && (currVerCourse.getId() != thisVerCourse.getId())) { startSeq = currVerCourse.getVersionInfo().getSequenceNumber() + 1; } for (VersionDisplayInfo versionInfo : versions) { if (versionInfo.getSequenceNumber() >= startSeq) { CourseInfo otherCourse = courseService .getCourse(versionInfo.getId()); if (otherCourse.getState().equals( DtoConstants.STATE_APPROVED) || otherCourse.getState().equals( DtoConstants.STATE_SUBMITTED) || otherCourse.getState().equals( DtoConstants.STATE_DRAFT)) { otherCourse.setState(DtoConstants.STATE_SUPERSEDED); courseService.updateCourse(otherCourse); updateStatementTreeViewInfoState(otherCourse); } } } } } public void setCourseService(CourseService courseService) { this.courseService = courseService; } /** * This method will load all the statements in a course from the course web * service, recursively update the state of each statement in the statement * tree, and save the update statements back to the web service. * * * @param courseInfo * The course to update (call setState() in this object to set * the state) * @throws DoesNotExistException * @throws InvalidParameterException * @throws MissingParameterException * @throws OperationFailedException * @throws PermissionDeniedException * @throws DataValidationErrorException * @throws CircularReferenceException * @throws VersionMismatchException */ public void updateStatementTreeViewInfoState(CourseInfo courseInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, DataValidationErrorException, CircularReferenceException, VersionMismatchException { // Call course web service to get all requirements/statements for this // course List statementTreeViewInfos = courseService .getCourseStatements(courseInfo.getId(), null, null); ]]> () { @Override public void onFailure(Throwable throwable) { Window.alert(throwable.getMessage()); GWT.log("Failed to retrieve clu", throwable); } @Override public void onSuccess(CluInfo cluInfo) { courseWidget.setLabelContent(cluInfo.getVersionInfo().getVersionIndId(), cluInfo.getOfficialIdentifier().getCode()); } }); } }); } }); customWidgets.put("kuali.reqComponent.field.type.course.clu.id", courseWidget); } else if (RulesUtil.isProgramWidget(fieldTypeInfo.getId())) { final ProgramWidget programWidget = new ProgramWidget(); programWidget.addGetCluNameCallback(new Callback() { @Override public void exec(Object id) { statementRpcServiceAsync.getCurrentVersion(CLU_NAMESPACE_URI, (String)id, new AsyncCallback() { @Override public void onFailure(Throwable throwable) { Window.alert(throwable.getMessage()); GWT.log("Failed to retrieve clu for id: '" + "'", throwable); } @Override public void onSuccess(final VersionDisplayInfo versionInfo) { statementRpcServiceAsync.getClu(versionInfo.getId(), new AsyncCallback() { @Override public void onFailure(Throwable throwable) { Window.alert(throwable.getMessage()); GWT.log("Failed to retrieve clu", throwable); } @Override public void onSuccess(CluInfo cluInfo) { programWidget.setLabelContent(cluInfo.getVersionInfo().getVersionIndId(), cluInfo.getOfficialIdentifier().getCode()); } }); } }); } }); customWidgets.put("kuali.reqComponent.field.type.program.clu.id", programWidget); } } } return customWidgets; } //called when user selects a rule type in the rule editor protected Callback retrieveCompositionTemplateCallback = new Callback(){ public void exec(final ReqComponentInfo reqComp) { statementRpcServiceAsync.translateReqComponentToNL(reqComp, COMPOSITION_TEMLATE, TEMLATE_LANGUAGE, new KSAsyncCallback() { public void handleFailure(Throwable caught) { Window.alert(caught.getMessage()); GWT.log("translateReqComponentToNL failed for req. comp. type: '" + reqComp.getType() + "'",caught); } public void onSuccess(final String compositionTemplate) { editReqCompWidget.displayFieldsStart(compositionTemplate); } }); } }; protected Callback> retrieveFieldsMetadataCallback = new Callback>(){ public void exec(final List fieldTypes) { if (fieldTypes.contains("kuali.reqComponent.field.type.grade.id")) { fieldTypes.add("kuali.reqComponent.field.type.gradeType.id"); } metadataServiceAsync.getMetadataList(ReqCompFieldInfo.class.getName(), fieldTypes, null, new KSAsyncCallback>() { public void handleFailure(Throwable caught) { Window.alert(caught.getMessage()); GWT.log("getMetadataList failed for req. comp. types: '" + fieldTypes.toString() + "'",caught); } public void onSuccess(final List metadataList) { editReqCompWidget.displayFieldsEnd(metadataList); } }); } }; protected Callback retrieveCustomWidgetCallback = new Callback(){ public void exec(final String fieldType) { if (RulesUtil.isCluSetWidget(fieldType)) { String clusetType = "kuali.cluSet.type.Course"; if (fieldType.toLowerCase().indexOf("program") > 0) { clusetType = "kuali.cluSet.type.Program"; } editReqCompWidget.displayCustomWidget(fieldType, new BuildCluSetWidget(new CluSetRetrieverImpl(), clusetType, false)); } } }; public boolean isUserClickedSaveButton() { ]]> iter = data.realPropertyIterator(); iter.hasNext();) { Property prop = iter.next(); Object fieldData = prop.getValue(); Object fieldKey = prop.getKey(); Metadata fieldMetadata = metadata.getProperties().get(fieldKey); //if the fieldMetadata is null then try to use the parent metadata as in the case of lists if(fieldMetadata==null){ fieldMetadata=metadata; } //If the fieldData is Data itself the recurse if (fieldData instanceof Data) { if (DataType.LIST.equals(fieldMetadata.getDataType())) { //Lists are a special case where the metadata property name is "*" Metadata listChildMetadata = fieldMetadata.getProperties().get("*"); //see if this is a list of data or a list of fields if(DataType.DATA.equals(listChildMetadata.getDataType())){ __translateIds((Data) prop.getValue(), listChildMetadata); }else{ //its a list of fields so loop through and translate using the "index" for(Iterator listIter = ((Data)fieldData).realPropertyIterator(); listIter.hasNext();){ Property listItem = listIter.next(); Object listData = listItem.getValue(); if (listData != null && listData instanceof String) { if (fieldMetadata.getInitialLookup() != null && !StringUtils.isEmpty((String) listData)) { //This is a string with a lookup so do the translation IdTranslation trans = idTranslator.getTranslation(fieldMetadata.getInitialLookup(), (String) listData); if (trans != null) { Integer index = listItem.getKey(); setTranslation((Data)fieldData, listItem.getKey().toString(), index, trans.getDisplay()); } } } } } } else { //Otherwise just use the fieldMetadata __translateIds((Data) prop.getValue(), fieldMetadata); } } else if (fieldData != null && fieldData instanceof String) { if (fieldMetadata.getInitialLookup() != null && !StringUtils.isEmpty((String) fieldData)) { //This is a string with a lookup so do the translation IdTranslation trans = idTranslator.getTranslation(fieldMetadata.getInitialLookup(), (String) fieldData); if (trans != null) { setTranslation(data, prop.getKey().toString(), null, trans.getDisplay()); } } } } } }catch(Exception e){ LOG.error("Error translating", e); } } private static void setTranslation(Data data, String field, Integer index, String translation) { if (data != null) { //Get runtime data for the node and create if it doesn't exist Data runtime = data.get("_runtimeData"); if (runtime == null) { runtime = new Data(); data.set("_runtimeData", runtime); } if(index != null) { //If the index is set this is a list item (foo/bar/0/, foo/bar/1/) Data fieldIndexData = runtime.get(index); if(fieldIndexData==null){ fieldIndexData = new Data(); runtime.set(index, fieldIndexData); } fieldIndexData.set("id-translation", translation); }else{ //Otherwise set the translation directly referenced by the field //If the index is set this is a list item (foo/bar/0/, foo/bar/1/) Data fieldData = runtime.get(field); if(fieldData==null){ fieldData = new Data(); runtime.set(field, fieldData); } fieldData.set("id-translation", translation); } } } } ]]> = startSeq && versionInfo.getSequenceNumber() != selectedVersion.getVersionInfo().getSequenceNumber()) { MajorDisciplineInfo otherProgram = programService.getMajorDiscipline(versionInfo.getId()); if (otherProgram.getState().equals(DtoConstants.STATE_APPROVED) || otherProgram.getState().equals(DtoConstants.STATE_ACTIVE)){ updateMajorDisciplineInfoState(otherProgram, DtoConstants.STATE_SUPERSEDED); } } } } /** * Get the current version of program given the selected version of program * * @param verIndId */ protected MajorDisciplineInfo getCurrentVersion(MajorDisciplineInfo majorDisciplineInfo) throws Exception { // Get version independent id of program String verIndId = majorDisciplineInfo.getVersionInfo().getVersionIndId(); // Get id of current version of program given the version independent id VersionDisplayInfo curVerDisplayInfo = programService.getCurrentVersion( ProgramServiceConstants.PROGRAM_NAMESPACE_MAJOR_DISCIPLINE_URI, verIndId); String curVerId = curVerDisplayInfo.getId(); // Return the current version of the course MajorDisciplineInfo currentVersion = programService.getMajorDiscipline(curVerId); return currentVersion; } /** * This method updates the end terms for the major discipline passed into it. *

* You must still call updateState() to save the object using the web service. * * @param majorDisciplineInfo * @param endEntryTerm * @param endEnrollTerm * @param endInstAdmitTerm * @throws OperationFailedException * @throws MissingParameterException * @throws InvalidParameterException * @throws DoesNotExistException */ private void setEndTerms(MajorDisciplineInfo majorDisciplineInfo, String endEntryTerm, String endEnrollTerm, String endInstAdmitTerm) throws InvalidParameterException, MissingParameterException, OperationFailedException, DoesNotExistException { //Set the end terms on the major discipline majorDisciplineInfo.setEndProgramEntryTerm(endEntryTerm); majorDisciplineInfo.setEndTerm(endEnrollTerm); majorDisciplineInfo.getAttributes().put("endInstAdmitTerm", endInstAdmitTerm); //Check if there are variations to process if(!majorDisciplineInfo.getVariations().isEmpty()){ //Find the major's end term atps and obtain their date information AtpInfo majorEndEntryTermAtp = atpService.getAtp(endEntryTerm); Date majorEndEntryTermEndDate = majorEndEntryTermAtp.getEndDate(); AtpInfo majorEndEnrollTermAtp = atpService.getAtp(endEnrollTerm); Date majorEndEnrollTermEndDate = majorEndEnrollTermAtp.getEndDate(); AtpInfo majorEndInstAdmitTermAtp = atpService.getAtp(endInstAdmitTerm); Date majorEndInstAdmitTermEndDate = majorEndInstAdmitTermAtp.getEndDate(); //Loop through the variations for(ProgramVariationInfo variation:majorDisciplineInfo.getVariations()){ //compare dates to get the older of the two end terms if(variation.getEndProgramEntryTerm() != null){ AtpInfo variationEndEntryTermAtp = atpService.getAtp(variation.getEndProgramEntryTerm()); Date variationEndEntryTermEndDate = variationEndEntryTermAtp.getEndDate(); if(majorEndEnrollTermEndDate.compareTo(variationEndEntryTermEndDate)<=0){ variation.setEndProgramEntryTerm(endEntryTerm); } }else{ variation.setEndProgramEntryTerm(endEntryTerm); } //compare dates to get the older of the two end terms if(variation.getEndTerm() != null){ AtpInfo variationEndTermAtp = atpService.getAtp(variation.getEndTerm()); Date variationEndTermEndDate = variationEndTermAtp.getEndDate(); if(majorEndEntryTermEndDate.compareTo(variationEndTermEndDate)<=0){ variation.setEndTerm(endEnrollTerm); } }else{ variation.setEndTerm(endEnrollTerm); } //compare dates to get the older of the two end terms if(variation.getAttributes().get("endInstAdmitTerm") != null){ AtpInfo variationEndInstAdmitAtp = atpService.getAtp(variation.getAttributes().get("endInstAdmitTerm")); Date variationEndInstAdmitEndDate = variationEndInstAdmitAtp.getEndDate(); if(majorEndInstAdmitTermEndDate.compareTo(variationEndInstAdmitEndDate)<=0){ variation.getAttributes().put("endInstAdmitTerm", endInstAdmitTerm); } }else{ variation.getAttributes().put("endInstAdmitTerm", endInstAdmitTerm); } } } } /** * This method will update the requirement state. *

* Note that it uses StatementUtil to update the statement tree. * * @param majorDisciplineInfo * @param newState * @throws Exception */ public void updateRequirementsState(List programRequirementIds, String newState) throws Exception { for (String programRequirementId : programRequirementIds) { // Get program requirement from the program service ProgramRequirementInfo programRequirementInfo = programService.getProgramRequirement(programRequirementId, null, null); // Look in the requirement for the statement tree StatementTreeViewInfo statementTree = programRequirementInfo.getStatement(); // And recursively update the entire tree with the new state StatementUtil.updateStatementTreeViewInfoState(newState, statementTree); // Update the state of the requirement object programRequirementInfo.setState(newState); // The write the requirement back to the program service programService.updateProgramRequirement(programRequirementInfo); } } /** * This method will update the requirements of each variation. *

* We need to do this here as opposed to in the assemblers, since we need * to make calls out to a separate web service. Also, this needs to be done here * because changing state no longer calls the save function. *

* Note that core and credential programs do not have variations so * this method isn't necessary. *

* * @param majorDisciplineInfo * @param newState * @throws Exception */ public void updateVariationsRequirementsState(List variationList, String newState) throws Exception { // Iterate over all variations for (ProgramVariationInfo variation : variationList) { // Get the requirements List programRequirementIds = variation.getProgramRequirements(); // Call the method that will update the requirements state for the program // This will also update the statement tree updateRequirementsState(programRequirementIds, newState); } } /** * This method is used by Spring to inject the program service into this bean. * * @param programService */ public void setProgramService(ProgramService programService) { this.programService = programService; } public void setAtpService(AtpService atpService) { this.atpService = atpService; } } ]]> getProgramRequirements(List programRequirementIds) throws Exception { List programReqInfos = new ArrayList(); for (String programReqId : programRequirementIds) { ProgramRequirementInfo rule = programService.getProgramRequirement(programReqId, null, null); setProgReqNL(rule); programReqInfos.add(rule); } return programReqInfos; } public Map storeProgramRequirements(Map states, Map progReqs) throws Exception { Map storedRules = new HashMap(); for (Integer key : progReqs.keySet()) { ProgramRequirementInfo rule = progReqs.get(key); switch (states.get(key)) { case STORED: //rule was not changed so continue storedRules.put(key, null); break; case ADDED: storedRules.put(key, createProgramRequirement(rule)); break; case EDITED: storedRules.put(key, updateProgramRequirement(rule)); break; case DELETED: storedRules.put(key, null); deleteProgramRequirement(rule.getId()); break; default: break; } } return storedRules; } public ProgramRequirementInfo createProgramRequirement(ProgramRequirementInfo programRequirementInfo) throws Exception { // If this requirement is using a temporary statement ID set the state to null if (programRequirementInfo.getId().indexOf(ProgramRequirementsSummaryView.NEW_PROG_REQ_ID) >= 0) { programRequirementInfo.setId(null); } // Strip the temporary statement IDs and allow permanent IDs to be created when written to the web service StatementUtil.stripStatementIds(programRequirementInfo.getStatement()); // Update the state of the statement tree to match the state of the requirement // Note: the requirement state already matches the program state (e.g. Draft, Approved, etc) StatementUtil.updateStatementTreeViewInfoState(programRequirementInfo.getState(), programRequirementInfo.getStatement()); // Call the web service to create the requirement and statement tree in the database ProgramRequirementInfo rule = programService.createProgramRequirement(programRequirementInfo); // Translate the requirement into its natural language equivalent setProgReqNL(rule); return rule; } public StatusInfo deleteProgramRequirement(String programRequirementId) throws Exception { return programService.deleteProgramRequirement(programRequirementId); } public ProgramRequirementInfo updateProgramRequirement(ProgramRequirementInfo programRequirementInfo) throws Exception { // Strip the temporary statement IDs and allow permanent IDs to be created when written to the web service StatementUtil.stripStatementIds(programRequirementInfo.getStatement()); // Update the state of the statement tree to match the state of the requirement // Note: the requirement state already matches the program state (e.g. Draft, Approved, etc) StatementUtil.updateStatementTreeViewInfoState(programRequirementInfo.getState(), programRequirementInfo.getStatement()); //TODO temporary fix - see KSLUM 1421 if (programRequirementInfo.getDescr() == null) { programRequirementInfo.setDescr(new RichTextInfo()); } ProgramRequirementInfo rule = programService.updateProgramRequirement(programRequirementInfo); setProgReqNL(rule); return rule; } private void setProgReqNL(ProgramRequirementInfo programRequirementInfo) throws Exception { setReqCompNL(programRequirementInfo.getStatement()); } private void setReqCompNL(StatementTreeViewInfo tree) throws Exception { List statements = tree.getStatements(); List reqComponentInfos = tree.getReqComponents(); if ((statements != null) && (statements.size() > 0)) { // retrieve all statements for (StatementTreeViewInfo statement : statements) { setReqCompNL(statement); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // retrieve all req. component LEAFS for (int i = 0; i < reqComponentInfos.size(); i++) { ReqComponentInfoUi reqUi = RulesUtil.clone(reqComponentInfos.get(i)); reqUi.setNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE", "en")); reqUi.setPreviewNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE.PREVIEW", "en")); reqComponentInfos.set(i, reqUi); } } } @Override public Boolean isLatestVersion(String versionIndId, Long versionSequenceNumber) throws Exception { ]]> > originalAdvancedSearchCallback = couWidget.getPicker().getAdvancedSearchCallback(); couWidget.getPicker().setAdvancedSearchCallback(new Callback>() { public void exec(List results) { //Chain the original call and add the new item(s) to the rest of the selects originalAdvancedSearchCallback.exec(results); if (unitCheckBox.getValue() && results.size() > 0) { for (SelectedResults res : results) { for(KSSelectedList select:unitSelects){ select.addItem(res.getReturnKey(), res.getDisplayKey()); } } } } }); } if(cod.getFieldWidget() instanceof KSSelectedList){ final KSSelectedList codWidget = (KSSelectedList)cod.getFieldWidget(); codWidget.getMainPanel().insert(divisionCheckBox, 1); codWidget.getAddItemButton().addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { if(divisionCheckBox.getValue()){ KSItemLabel lastAdded = codWidget.getSelectedItems().get(codWidget.getSelectedItems().size()-1); for(KSSelectedList select:divisionSelects){ select.addItem(lastAdded.getKey(), lastAdded.getDisplayText()); } } } }); } } } ]]> getExportElementsFromView() { String viewName = null; String sectionTitle = null; View currentView = this.getCurrentView(); if (currentView != null) { ArrayList exportElements = new ArrayList(); if (currentView != null && currentView instanceof Section) { Section currentSection = (Section) currentView; List

nestedSections = currentSection.getSections(); for (int i = 0; i < nestedSections.size(); i++) { ExportElement sectionExportItem = new ExportElement(); ArrayList subList = null; Section nestedSection = nestedSections.get(i); if (nestedSection != null && nestedSection instanceof SectionView) { SectionView nestedSectionView = (SectionView) nestedSection; viewName = nestedSectionView.getName(); subList = new ArrayList(); if (this.getCurrentViewEnum().equals(ProgramSections.SUMMARY)) { sectionExportItem.setSectionName(viewName); List
sectionList = nestedSectionView.getSections(); for (int j = 0; j < sectionList.size(); j++) { if (sectionList.get(j) instanceof SummaryTableSection) { SummaryTableSection tableSection = (SummaryTableSection) sectionList.get(j); ExportElement heading = new ExportElement(); heading.setFieldLabel(""); heading.setFieldValue(programModel.getModelName()); heading.setFieldValue2(comparisonModel.getModelName()); subList.add(heading); subList.addAll(ExportUtils.getDetailsForWidget(tableSection.getSummaryTable())); } else if (sectionList.get(j) instanceof CollapsableSection) { List
sectionColList = sectionList.get(j).getSections(); for (int k = 0; k < sectionColList.size(); k++) { SummaryTableSection tableSection = (SummaryTableSection) sectionColList.get(k); ExportElement heading = new ExportElement(); heading.setFieldLabel(""); heading.setFieldValue(programModel.getModelName()); heading.setFieldValue2(comparisonModel.getModelName()); subList.add(heading); subList.addAll(ExportUtils.getDetailsForWidget(tableSection.getSummaryTable())); } } } } else { sectionTitle = nestedSectionView.getTitle(); sectionExportItem.setSectionName(sectionTitle + " " + i + " - " + viewName); sectionExportItem.setViewName(sectionTitle + " " + i + " - " + viewName); subList = ExportUtils.getExportElementsFromView(nestedSectionView, subList, viewName, sectionTitle); } if (subList != null && subList.size()> 0) { sectionExportItem.setSubset(subList); if (i == 0 && this.getCurrentViewEnum().equals(ProgramSections.SUMMARY)) exportElements.add(sectionExportItem); exportElements.add(sectionExportItem); } } } } return exportElements; } else { // logger.warn("ExportUtils.getExportElementsFromView controller currentView is null :" + this.getClass().getName()); } return null; } @Override public String getExportTemplateName() { if (this.getCurrentViewEnum().equals(ProgramSections.SUMMARY)) return "proposal.template"; return "base.template"; } } ]]> > excludedViews = new ArrayList>(); excludedViews.add(ProgramSections.PROGRAM_REQUIREMENTS_EDIT); excludedViews.add(ProgramSections.SUPPORTING_DOCUMENTS_EDIT); excludedViews.add(ProgramSections.SUMMARY); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), saveButton, excludedViews); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), cancelButton, excludedViews); initialized = true; } } private void bind() { saveButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { doSave(); } }); cancelButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { doCancel(); } }); eventBus.addHandler(StoreRequirementIDsEvent.TYPE, new StoreRequirementIDsEvent.Handler() { @Override public void onEvent(StoreRequirementIDsEvent event) { List ids = event.getProgramRequirementIds(); programModel.set(QueryPath.parse(ProgramConstants.PROGRAM_REQUIREMENTS), new Data()); Data programRequirements = getDataProperty(ProgramConstants.PROGRAM_REQUIREMENTS); if (programRequirements == null) { Window.alert("Cannot find program requirements in data model."); GWT.log("Cannot find program requirements in data model", null); return; } for (String id : ids) { programRequirements.add(id); } doSave(); } }); eventBus.addHandler(ChangeViewEvent.TYPE, new ChangeViewEvent.Handler() { @Override public void onEvent(ChangeViewEvent event) { showView(event.getViewToken()); } }); eventBus.addHandler(UpdateEvent.TYPE, new UpdateEvent.Handler() { @Override public void onEvent(UpdateEvent event) { doSave(event.getOkCallback()); } }); eventBus.addHandler(StateChangeEvent.TYPE, new StateChangeEvent.Handler() { @Override public void onEvent(final StateChangeEvent event) { programModel.validateNextState(new Callback>() { @Override public void exec(List result) { boolean isSectionValid = isValid(result, true); if (isSectionValid) { Callback callback = new Callback() { @Override public void exec(Boolean result) { if (result) { reloadMetadata = true; loadMetadata(new Callback() { @Override public void exec(Boolean result) { if (result) { ProgramUtils.syncMetadata(configurer, programModel.getDefinition()); HistoryManager.navigate(AppLocations.Locations.VIEW_BACC_PROGRAM.getLocation(), context); ]]> editReqCompCallback = new Callback(){ public void exec(ReqComponentInfo reqComp) { setEnabled(false); editReqCompWidget.setupExistingReqComp(reqComp); editedReqCompInfo = reqComp; } }; protected Callback ruleChangedCallback = new Callback(){ public void exec(Boolean ruleChanged) { actionCancelButtons.getButton(ButtonEnumerations.SaveCancelEnum.SAVE).setEnabled(ruleChanged); } }; protected void setEnabled(boolean enabled) { ruleManageWidget.setEnabled(enabled); actionCancelButtons.getButton(ButtonEnumerations.SaveCancelEnum.SAVE).setEnabled(enabled); } @Override public boolean isDirty() { if (!isInitialized) { return false; } //TODO until we figure out how to detect changes, always return true return true; //first check logic expression // if (!ruleManageWidget.getLogicExpression().equals(originalLogicExpression)) { // return true; // } //next check NL for req. components // if ((originalNL == null) && (rule.getNaturalLanguageTranslation() == null)) { // return !ruleManageWidget.getLogicExpression().equals(originalLogicExpression); // } //TODO how to check whether rule changed or not? // !(ruleManageWidget.getLogicExpression().equals(originalLogicExpression) && getAllReqCompNLs().equals(originalReqCompNL)); } private String getAllReqCompNLs() { StringBuilder NL = new StringBuilder(); for (StatementTreeViewInfo tree : rule.getStatements()) { for (ReqComponentInfo reqComp : tree.getReqComponents()) { NL.append(reqComp.getNaturalLanguageTranslation()); } } return NL.toString(); } //called when user clicks 'Add Rule' or 'Update Rule' when editing a req. component protected Callback actionButtonClickedReqCompCallback = new Callback(){ public void exec(final ReqComponentInfoUi reqComp) { editReqCompWidget.setupNewReqComp(); setEnabled(true); //true if user cancel adding/editing req. component if (reqComp == null) { return; } KSBlockingProgressIndicator.addTask(creatingRuleTask); //1. update NL for the req. component statementRpcServiceAsync.translateReqComponentToNLs(reqComp, new String[]{RULEEDIT_TEMLATE, RULEPREVIEW_TEMLATE}, TEMLATE_LANGUAGE, new KSAsyncCallback>() { public void handleFailure(Throwable caught) { KSBlockingProgressIndicator.removeTask(creatingRuleTask); Window.alert(caught.getMessage()); GWT.log("translateReqComponentToNL failed", caught); } public void onSuccess(final List reqCompNL) { reqComp.setNaturalLanguageTranslation(reqCompNL.get(0)); reqComp.setPreviewNaturalLanguageTranslation(reqCompNL.get(1)); //2. add / update req. component rule = ruleManageWidget.getStatementTreeViewInfo(); //TODO ? if (editedReqCompInfo == null) { //add req. component if (rule.getStatements() != null && !rule.getStatements().isEmpty()) { StatementTreeViewInfo newStatementTreeViewInfo = new StatementTreeViewInfo(); newStatementTreeViewInfo.setId(CourseRequirementsSummaryView.NEW_STMT_TREE_ID + Integer.toString(tempStmtTreeViewInfoID++)); ]]> currentView = getCurrentViewEnum(); if (currentView.name().equals(ProgramSections.VIEW_ALL.name())) { HistoryManager.navigate(AppLocations.Locations.VIEW_PROGRAM.getLocation(), getViewContext()); } else { showView(currentView); } } /** * Handles after save work for specializations. */ private void handleSpecializations() { String newVariationId = null; Data variations = programModel.get(ProgramConstants.VARIATIONS); for (Data.Property prop : variations) { String varId = (String) ((Data) prop.getValue()).get(ProgramConstants.ID); if (!existingVariationIds.contains(varId)) { newVariationId = varId; existingVariationIds.add(newVariationId); break; } } if (newVariationId != null) { eventBus.fireEvent(new SpecializationCreatedEvent(newVariationId)); } else { eventBus.fireEvent(new SpecializationUpdateEvent(variations)); } } private void throwAfterSaveEvent() { eventBus.fireEvent(new AfterSaveEvent(programModel, this)); } @Override public void onModelLoadedEvent() { Enum changeSection = ProgramRegistry.getSection(); if (changeSection != null) { showView(changeSection); ProgramRegistry.setSection(null); } else { String id = getStringProperty(ProgramConstants.ID); if (id == null) { showView(ProgramSections.PROGRAM_DETAILS_EDIT); } else { showView(ProgramSections.PROGRAM_PROPOSAL_EDIT); ]]> programRequirements) { this.programRequirements = programRequirements; } public List getDivisionsContentOwner() { return divisionsContentOwner; } public void setDivisionsContentOwner(List divisionsContentOwner) { this.divisionsContentOwner = divisionsContentOwner; } public List getDivisionsStudentOversight() { return divisionsStudentOversight; } public void setDivisionsStudentOversight(List divisionsStudentOversight) { this.divisionsStudentOversight = divisionsStudentOversight; } public List getDivisionsDeployment() { return divisionsDeployment; } public void setDivisionsDeployment(List divisionsDeployment) { this.divisionsDeployment = divisionsDeployment; } public List getDivisionsFinancialResources() { return divisionsFinancialResources; } public void setDivisionsFinancialResources(List divisionsFinancialResources) { this.divisionsFinancialResources = divisionsFinancialResources; } public List getDivisionsFinancialControl() { return divisionsFinancialControl; } public void setDivisionsFinancialControl(List divisionsFinancialControl) { this.divisionsFinancialControl = divisionsFinancialControl; } public List getUnitsContentOwner() { return unitsContentOwner; } public void setUnitsContentOwner(List unitsContentOwner) { this.unitsContentOwner = unitsContentOwner; } public List getUnitsStudentOversight() { return unitsStudentOversight; } public void setUnitsStudentOversight(List unitsStudentOversight) { this.unitsStudentOversight = unitsStudentOversight; } public List getUnitsDeployment() { return unitsDeployment; } public void setUnitsDeployment(List unitsDeployment) { this.unitsDeployment = unitsDeployment; } public List getUnitsFinancialResources() { return unitsFinancialResources; } public void setUnitsFinancialResources(List unitsFinancialResources) { this.unitsFinancialResources = unitsFinancialResources; } public List getUnitsFinancialControl() { return unitsFinancialControl; } public void setUnitsFinancialControl(List unitsFinancialControl) { this.unitsFinancialControl = unitsFinancialControl; } /** * List of key/value pairs, typically used for dynamic attributes. */ @Override public Map getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } @Override public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } ]]> newReqCompSelectedCallbackCallback = new Callback(){ public void exec(final ReqComponentInfo reqComp) { setEnabled(false); } }; private void retrieveAndSetupReqCompTypes() { statementRpcServiceAsync.getReqComponentTypesForStatementType(rule.getType(), new KSAsyncCallback>() { public void handleFailure(Throwable cause) { GWT.log("Failed to get req. component types for statement of type:" + rule.getType(), cause); Window.alert("Failed to get req. component types for statement of type:" + rule.getType()); } public void onSuccess(final List reqComponentTypeInfoList) { if (reqComponentTypeInfoList == null || reqComponentTypeInfoList.size() == 0) { GWT.log("Missing Requirement Component Types", null); Window.alert("Missing Requirement Component Types"); return; } editReqCompWidget.setReqCompList(reqComponentTypeInfoList); editReqCompWidget.setCustomWidgets(getCustomWidgets(reqComponentTypeInfoList)); } }); } private Map getCustomWidgets(List reqComponentTypeInfoList) { Map customWidgets = new HashMap(); for (ReqComponentTypeInfo reqCompTypeInfo : reqComponentTypeInfoList) { for (ReqCompFieldTypeInfo fieldTypeInfo : reqCompTypeInfo.getReqCompFieldTypeInfos()) { if (RulesUtil.isGradeWidget(fieldTypeInfo.getId())) { customWidgets.put("kuali.reqComponent.field.type.grade.id", new GradeWidget()); } else if (RulesUtil.isCourseWidget(fieldTypeInfo.getId())) { final CourseWidget courseWidget = GWT.create(CourseWidget.class); courseWidget.addGetCluNameCallback(new Callback() { @Override public void exec(Object id) { ]]> getTokenList(List tokenValueList) { List tokenList = new ArrayList(); for (String value : tokenValueList) { if (value.isEmpty()) { continue; } if ("(".equals(value)) { Token t = new Token(); t.type = Token.StartParenthesis; tokenList.add(t); } else if (")".equals(value)) { Token t = new Token(); t.type = Token.EndParenthesis; tokenList.add(t); } else if ("and".equals(value)) { Token t = new Token(); t.type = Token.And; tokenList.add(t); } else if ("or".equals(value)) { Token t = new Token(); t.type = Token.Or; tokenList.add(t); } else { Token t = new Token(); t.type = Token.Condition; t.value = value; tokenList.add(t); } } return tokenList; } private List getTokenValue(String expression) { expression = expression.toLowerCase(); List tokenValueList = new ArrayList(); StringBuffer tokenValue = new StringBuffer(); for (int i = 0; i < expression.length(); i++) { char ch = expression.charAt(i); if (ch == ' ') { tokenValueList.add(tokenValue.toString()); tokenValue = new StringBuffer(); } else if (ch == '(' || ch == ')') { tokenValueList.add(tokenValue.toString()); tokenValue = new StringBuffer(); tokenValueList.add(String.valueOf(ch)); } else { tokenValue.append(ch); } } tokenValueList.add(tokenValue.toString()); return tokenValueList; } ]]> view = event.getCurrentView(); if (view != null) { setCurrentViewEnum(view); } doSave(event.getOkCallback()); } }); eventBus.addHandler(StateChangeEvent.TYPE, new StateChangeEvent.Handler() { @Override public void onEvent(final StateChangeEvent event) { //FIXME: The proper way of doing this would be a single server side call to validate next state //which would retrieve warnings & required for next state, instead of re-validating warnings for //current state server side and validating required for next state client side. programRemoteService.validate(programModel.getRoot(), new KSAsyncCallback>(){ @Override public void onSuccess(final List currentStateResults) { programModel.validateNextState(new Callback>() { @Override public void exec(List nextStateResults) { //Update validation warnings and process for all screens Application.getApplicationContext().clearValidationWarnings(); Application.getApplicationContext().addValidationWarnings(currentStateResults); isValid(Application.getApplicationContext().getValidationWarnings(), false); boolean isSectionValid = isValid(nextStateResults, true) && Application.getApplicationContext().getValidationWarnings().isEmpty(); if (isSectionValid) { Callback callback = new Callback() { @Override public void exec(Boolean result) { if (result) { reloadMetadata = true; loadMetadata(new Callback() { @Override public void exec(Boolean result) { if (result) { ProgramUtils.syncMetadata(configurer, programModel.getDefinition()); HistoryManager.navigate(AppLocations.Locations.VIEW_PROGRAM.getLocation(), context); } } }); } ]]> onReadyCallback) { if(!initialized){ Application.getApplicationContext().clearCrossConstraintMap(null); Application.getApplicationContext().clearPathToFieldMapping(null); } //Clear the parent path again Application.getApplicationContext().setParentPath(""); super.beforeShow(onReadyCallback); } //Before show is called before the model is bound to the widgets. We need to update cross constraints after widget binding //This gets called twice which is not optimal @Override public > void showView(V viewType, final Callback onReadyCallback) { Callback updateCrossConstraintsCallback = new Callback(){ public void exec(Boolean result) { onReadyCallback.exec(result); for(HasCrossConstraints crossConstraint:Application.getApplicationContext().getCrossConstraints(null)){ crossConstraint.reprocessWithUpdatedConstraints(); } showWarnings(); } }; super.showView(viewType, updateCrossConstraintsCallback); } //Ensure that the managing bodies section view is updated before the user edits specializations @Override public void beforeViewChange(final Enum viewChangingTo, final Callback okToChangeCallback){ final Callback reallyOkToChange = new Callback() { @Override public void exec(Boolean result) { if (result) { if (LUMViews.VARIATION_EDIT.equals(viewChangingTo)) { getView(ProgramSections.MANAGE_BODIES_EDIT, new Callback() { @Override public void exec(final View view) { if (view != null && view instanceof SectionView) { requestModel(new ModelRequestCallback() { public void onModelReady(DataModel model) { ((SectionView) view).updateWidgetData(model); okToChangeCallback.exec(true); } public void onRequestFail(Throwable cause) { okToChangeCallback.exec(false); } }); } else { okToChangeCallback.exec(true); } } }); } else { okToChangeCallback.exec(true); } } } }; super.beforeViewChange(viewChangingTo, reallyOkToChange); this.showExport(isExportButtonActive()); // KSLAB-1916 } ]]> getSelectedItems() { return selectItemWidget.getSelectedItems(); } /** * @see org.kuali.student.common.ui.client.widgets.list.KSSelectItemWidgetAbstract#selectItem(java.lang.String) */ public void selectItem(String id) { selectItemWidget.selectItem(id); } public void setListItems(ListItems listItems) { selectItemWidget.setListItems(listItems); } /** * Use to set number of columns to use when displaying list * */ public void setColumnSize(int cols){ selectItemWidget.setColumnSize(cols); } public void setMultipleSelect(boolean isMultipleSelect) {} /** * This overridden method is not used * * @see org.kuali.student.common.ui.client.widgets.list.KSSelectItemWidgetAbstract#onLoad() */ @Override public void onLoad() {} public HandlerRegistration addSelectionChangeHandler(SelectionChangeHandler handler) { return selectItemWidget.addSelectionChangeHandler(handler); } public ListItems getListItems() { return selectItemWidget.getListItems(); } public String getName() { return selectItemWidget.getName(); } public void setName(String name) { selectItemWidget.setName(name); } @Override public void setEnabled(boolean b) { selectItemWidget.setEnabled(b); } @Override public boolean isEnabled() { return selectItemWidget.isEnabled(); } @Override public boolean isMultipleSelect() { return selectItemWidget.isMultipleSelect(); } @Override public void redraw() { selectItemWidget.redraw(); } @Override public void clear() { selectItemWidget.clear(); } @Override public HandlerRegistration addBlurHandler(BlurHandler handler) { return selectItemWidget.addBlurHandler(handler); } @Override public HandlerRegistration addFocusHandler(FocusHandler handler) { return selectItemWidget.addFocusHandler(handler); } public void addWidgetReadyCallback(Callback callback) { selectItemWidget.addWidgetReadyCallback(callback); } public boolean isInitialized() { return selectItemWidget.isInitialized(); } public void setInitialized(boolean initialized) { selectItemWidget.setInitialized(initialized); } /** * By default if the list items used by the radiobutton has multiple attributes, the radiobutton * generated will display all attributes as columns. Set this property to true if this * behavior is not desired. * * @param ignoreMultiple */ public void setIgnoreMultipleAttributes(boolean ignoreMultiple){ selectItemWidget.setIgnoreMultipleAttributes(ignoreMultiple); } } ]]> getSelectedItems() { return selectItemWidget.getSelectedItems(); } /** * @see org.kuali.student.common.ui.client.widgets.list.KSSelectItemWidgetAbstract#selectItem(java.lang.String) */ public void selectItem(String id) { selectItemWidget.selectItem(id); } public void setListItems(ListItems listItems) { selectItemWidget.setListItems(listItems); } /** * Use to set number of columns to use when displaying list * */ public void setColumnSize(int cols){ selectItemWidget.setColumnSize(cols); } public void setMultipleSelect(boolean isMultipleSelect) {} /** * This overridden method is not used * * @see org.kuali.student.common.ui.client.widgets.list.KSSelectItemWidgetAbstract#onLoad() */ @Override public void onLoad() {} public HandlerRegistration addSelectionChangeHandler(SelectionChangeHandler handler) { return selectItemWidget.addSelectionChangeHandler(handler); } public ListItems getListItems() { return selectItemWidget.getListItems(); } public String getName() { return selectItemWidget.getName(); } public void setName(String name) { selectItemWidget.setName(name); } @Override public void setEnabled(boolean b) { selectItemWidget.setEnabled(b); } @Override public boolean isEnabled() { return selectItemWidget.isEnabled(); } @Override public boolean isMultipleSelect() { return selectItemWidget.isMultipleSelect(); } @Override public void redraw() { selectItemWidget.redraw(); } @Override public void clear() { selectItemWidget.clear(); } @Override public HandlerRegistration addBlurHandler(BlurHandler handler) { return selectItemWidget.addBlurHandler(handler); } @Override public HandlerRegistration addFocusHandler(FocusHandler handler) { return selectItemWidget.addFocusHandler(handler); } public void addWidgetReadyCallback(Callback callback) { selectItemWidget.addWidgetReadyCallback(callback); } public boolean isInitialized() { return selectItemWidget.isInitialized(); } public void setInitialized(boolean initialized) { selectItemWidget.setInitialized(initialized); } /** * By default if the list items used by the checkbox has multiple attributes, the checkbox * generated will display all attributes as columns. Set this property to true if this * behavior is not desired. * * @param ignoreMultiple */ public void setIgnoreMultipleAttributes(boolean ignoreMultiple){ selectItemWidget.setIgnoreMultipleAttributes(ignoreMultiple); } } ]]> subset = ExportUtils.getDetailsForWidget(child, viewName, sectionName); if (subset != null && subset.size() > 0){ subset.get(0).setPrintType(ExportElement.LIST); childElements.addAll(subset); } } else if (!(child instanceof KSButton) && !(child instanceof WarnContainer)) { ExportElement exportItem = createExportElement(viewName, sectionName, childElements, child); exportItem.setPrintType(ExportElement.LIST); } } } } else if (currentViewWidget instanceof ComplexPanel) { ComplexPanel complexPanel = (ComplexPanel) currentViewWidget; if (complexPanel.isVisible()){ for (int i = 0; i < complexPanel.getWidgetCount(); i++) { Widget child = complexPanel.getWidget(i); if (child instanceof FlowPanel){ List subset = ExportUtils.getDetailsForWidget(child, viewName, sectionName); if (subset != null && subset.size() > 0){ childElements.addAll(subset); } } else if (!(child instanceof KSButton) && !(child instanceof WarnContainer)) { createExportElement(viewName, sectionName, childElements, child); } } } } else { System.out.println("ExportUtils does not cater for this type..." + currentViewWidget.getClass().getName()); } } return childElements; } public static ArrayList getExportElementsFromView(Widget currentViewWidget, ArrayList exportElements, String viewName, String sectionName) { ]]> > getRPN(List> nodeList) { List> rpnList = new ArrayList>(); Stack> operatorStack = new Stack>(); for (Node node : nodeList) { if (node.getUserObject().type == Token.Condition) { rpnList.add(node); } else if (node.getUserObject().type == Token.And) { operatorStack.push(node); } else if (node.getUserObject().type == Token.StartParenthesis) { operatorStack.push(node); } else if (node.getUserObject().type == Token.Or) { if (operatorStack.isEmpty() == false && operatorStack.peek().getUserObject().type == Token.And) { do { rpnList.add(operatorStack.pop()); } while (operatorStack.isEmpty() == false && operatorStack.peek().getUserObject().type == Token.And); } operatorStack.push(node); } else if (node.getUserObject().type == Token.EndParenthesis) { while (operatorStack.peek().getUserObject().type != Token.StartParenthesis) { rpnList.add(operatorStack.pop()); } operatorStack.pop();// pop the ( } } if (operatorStack.isEmpty() == false) { do { rpnList.add(operatorStack.pop()); } while (operatorStack.isEmpty() == false); } return rpnList; } private int findNodeIndex(List> nodeList, int type) { ]]> >() { @Override public void exec(List result) { boolean isSectionValid = isValid(result, true); if (isSectionValid) { saveData(okCallback); } else { okCallback.exec(false); KSNotifier.add(new KSNotification("Unable to save, please check fields for errors.", false, true, 5000)); } } }); } @Override public void onRequestFail(Throwable cause) { GWT.log("Unable to retrieve model for validation and save", cause); } }); } private void saveData(final Callback okCallback) { programRemoteService.saveData(programModel.getRoot(), new AbstractCallback(getLabel(ProgramMsgConstants.COMMON_SAVINGDATA)) { @Override public void onSuccess(DataSaveResult result) { super.onSuccess(result); //Clear warning states on field and any warnings stored in ApplicationContext; clearAllWarnings(); Application.getApplicationContext().clearValidationWarnings(); List validationResults = result.getValidationResults(); Application.getApplicationContext().addValidationWarnings(validationResults); if (ValidatorClientUtils.hasErrors(validationResults)) { isValid(result.getValidationResults(), false, true); StringBuilder msg = new StringBuilder(); for (ValidationResultInfo vri : result.getValidationResults()) { if(!msg.toString().contains(vri.getMessage())) msg.append(vri.getMessage() + " "); } if (msg.length() > 0) KSNotifier.add(new KSNotification(msg.toString(), false, true, 5000)); okCallback.exec(false); } else { refreshModelAndView(result); ]]> getSelectedRows(){ List rows = new ArrayList(); Set selectedRows = pagingScrollTable.getDataTable().getSelectedRows(); for(Integer i: selectedRows){ rows.add(pagingScrollTable.getRowValue(i)); } return rows; } public List getSelectedIds(){ List ids = new ArrayList(); Set selectedRows = pagingScrollTable.getDataTable().getSelectedRows(); for(Integer i: selectedRows){ ids.add(pagingScrollTable.getRowValue(i).getId()); } return ids; } public List getAllIds(){ List ids = new ArrayList(); for(ResultRow r: resultRows){ ids.add(r.getId()); } return ids; } public List getAllRows(){ List rows = new ArrayList(); for(ResultRow r: resultRows){ rows.add(r); } return rows; } public String getOrgId(){ return this.orgId; } public void setOrgId(String orgId){ this.orgId=orgId; } ]]> theItems, int currentDepth){ int itemNum = 0; for(KSMenuItemData i: theItems){ itemNum++; addMenuItem(new MenuItemPanel(i, currentDepth, itemNum)); if(!(i.getSubItems().isEmpty())){ createMenuItems(i.getSubItems(), currentDepth + 1); } i.addMenuEventHandler(MenuSelectEvent.TYPE, menuHandler); i.addMenuEventHandler(MenuChangeEvent.TYPE, menuHandler); } } private void addMenuItem(MenuItemPanel panel){ menuPanel.add(panel); menuItems.add(panel); } public boolean isNumberAllItems() { return numberAllItems; } public void setNumberAllItems(boolean numberAllItems) { this.numberAllItems = numberAllItems; } @Override public boolean selectMenuItem(String[] hierarchy) { List currentItems = items; KSMenuItemData itemToSelect = null; for(String s: hierarchy){ s = s.trim(); for(KSMenuItemData i: currentItems){ if(s.equalsIgnoreCase(i.getLabel().trim())){ itemToSelect = i; currentItems = i.getSubItems(); break; } } } if(itemToSelect != null){ for(MenuItemPanel p: menuItems){ if(itemToSelect.equals(p.getItem())){ p.getItem().setSelected(true); return true; } } } return false; } /** * @see org.kuali.student.common.ui.client.widgets.menus.KSMenu#clearSelected() */ @Override public void clearSelected() { for(MenuItemPanel m : menuItems){ m.deSelect(); m.getItem().unhandledSetSelected(false); } } ]]> * WARNING: you must call the statement service in order to update statements. *

* * @param state is the state we should set all statements in the tree to * @param statementTreeViewInfo the tree of statements * @throws Exception */ public static void updateStatementTreeViewInfoState(String state, StatementTreeViewInfo statementTreeViewInfo) { // Set the state on the statement tree itself statementTreeViewInfo.setState(state); // Get all the requirements components for this statement List reqComponents = statementTreeViewInfo.getReqComponents(); // Loop over requirements and set the state for each requirement for(Iterator it = reqComponents.iterator(); it.hasNext();) it.next().setState(state); // Loop over each statement and set the state for each statement (recursively calling this method) for(Iterator itr = statementTreeViewInfo.getStatements().iterator(); itr.hasNext();) updateStatementTreeViewInfoState(state, (StatementTreeViewInfo)itr.next()); } /** * This method strips the statement ids from the statement tree prior to saving * the tree, which allows the web service to generate new ids from the database. *

* The UI needs to create temporary ids in order to work with the statements * in memory prior to storing them in the database. On save, we strip * the temporary ids in this method, then write the statement tree to the database, * allowing the database to generate proper ids. *

* * @param tree */ public static void stripStatementIds(StatementTreeViewInfo tree) { List statements = tree.getStatements(); List reqComponentInfos = tree.getReqComponents(); // If there are no statements in the tree, set its ID to null if ((tree.getId() != null) && (tree.getId().indexOf(NEW_STMT_TREE_ID) >= 0)) { tree.setId(null); } // If there are statements in the tree if ((statements != null) && (statements.size() > 0)) { // retrieve all statements, loop over them, and recursively strip their IDs for (StatementTreeViewInfo statement : statements) { stripStatementIds(statement); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // If there are requirements, loop over them and set their IDs to null for (ReqComponentInfo reqComponent : reqComponentInfos) { if ((reqComponent.getId() != null) && (reqComponent.getId().indexOf(NEW_REQ_COMP_ID) >= 0)) { reqComponent.setId(null); } // Also set the field IDs to null for (ReqCompFieldInfo field : reqComponent.getReqCompFields()) { field.setId(null); } } } } } ]]> newCluState variable only if it differs from the * currentCluState value. Otherwise null will be returned. */ protected String getCourseStateFromNewState(String currentCourseState, String newCourseState) { if (LOG.isInfoEnabled()) { LOG.info("current CLU state is '" + currentCourseState + "' and new CLU state will be '" + newCourseState + "'"); } return getStateFromNewState(currentCourseState, newCourseState); } ]]> statements = tree.getStatements(); List reqComponentInfos = tree.getReqComponents(); if ((statements != null) && (statements.size() > 0)) { // retrieve all statements for (StatementTreeViewInfo statement : statements) { setReqCompNL(statement); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // retrieve all req. component LEAFS for (int i = 0; i < reqComponentInfos.size(); i++) { ReqComponentInfoUi reqUi = RulesUtil.clone(reqComponentInfos.get(i)); reqUi.setNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE", "en")); reqUi.setPreviewNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE.PREVIEW", "en")); reqComponentInfos.set(i, reqUi); } } } @Override public Boolean isLatestVersion(String versionIndId, Long versionSequenceNumber) throws Exception { //Perform a search to see if there are any new versions of the course that are approved, draft, etc. //We don't want to version if there are SearchRequest request = new SearchRequest("lu.search.isVersionable"); request.addParam("lu.queryParam.versionIndId", versionIndId); request.addParam("lu.queryParam.sequenceNumber", versionSequenceNumber.toString()); List states = new ArrayList(); states.add("Approved"); states.add("Active"); states.add("Draft"); states.add("Superseded"); request.addParam("lu.queryParam.luOptionalState", states); SearchResult result = luService.search(request); String resultString = result.getRows().get(0).getCells().get(0).getValue(); return "0".equals(resultString); } public void setCourseService(CourseService courseService) { ]]> cluSetIds = (cluSetInfo == null)? null : cluSetInfo.getCluSetIds(); List unWrappedCluSetIds = null; List wrappedCluSets = null; List subCluSets = null; try { if (cluSetIds != null && !cluSetIds.isEmpty()) { subCluSets = luService.getCluSetInfoByIdList(cluSetIds); } } catch (Exception e) { LOG.error(e.getMessage(), e); throw new AssemblyException("Failed to retrieve the sub clusets of cluset " + cluSetInfo.getId()); } // goes through the list of sub clusets and ignore the ones that are not reusable if (subCluSets != null) { for (CluSetInfo subCluSet : subCluSets) { if (subCluSet.getIsReusable()) { unWrappedCluSetIds = (unWrappedCluSetIds == null)? new ArrayList() : unWrappedCluSetIds; unWrappedCluSetIds.add(subCluSet.getId()); } else { wrappedCluSets = (wrappedCluSets == null)? new ArrayList() : wrappedCluSets; wrappedCluSets.add(subCluSet); } } } cluSetInfo.setCluSetIds(unWrappedCluSetIds); if (wrappedCluSets != null) { for (CluSetInfo wrappedCluSet : wrappedCluSets) { MembershipQueryInfo mqInfo = wrappedCluSet.getMembershipQuery(); if (wrappedCluSet.getCluIds() != null && !wrappedCluSet.getCluIds().isEmpty()) { cluSetInfo.setCluIds(wrappedCluSet.getCluIds()); } if (mqInfo != null && mqInfo.getSearchTypeKey() != null && !mqInfo.getSearchTypeKey().isEmpty()) { cluSetInfo.setMembershipQuery(mqInfo); } } } } private List getCluInformations(List cluIds) throws OperationFailedException { ]]> getCatalogPublicationTargets() { return catalogPublicationTargets; } public void setCatalogPublicationTargets(List catalogPublicationTargets) { this.catalogPublicationTargets = catalogPublicationTargets; } /** * Learning Objectives associated with this Variation. */ public List getLearningObjectives() { if (learningObjectives == null) { learningObjectives = new ArrayList(0); } return learningObjectives; } public void setLearningObjectives(List learningObjectives) { this.learningObjectives = learningObjectives; } /** * Places where this Variation might be offered */ public List getCampusLocations() { if (campusLocations == null) { campusLocations = new ArrayList(0); } return campusLocations; } public void setCampusLocations(List campusLocations) { this.campusLocations = campusLocations; } /** * Program Variation Requirements. */ public List getProgramRequirements() { ]]> attributes; @XmlAttribute(name="key") private String id; /** * Short name of the LO to LO relationship type. This is primarily to be used by developers and may end up translated in the end system. */ public String getName() { return name; } public void setName(String name) { this.name = name; } /** * Narrative description of the LO to LO relationship type. */ public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } /** * Name for the reverse LO to LO relationship type. This is primarily to be used by developers and may end up translated in the end system. */ public String getRevName() { return revName; } public void setRevName(String revName) { this.revName = revName; } /** * Description of the reverse of the LO to LO relationship type */ public String getRevDesc() { return revDesc; } public void setRevDesc(String revDesc) { this.revDesc = revDesc; } /** * Date and time that this LO to LO relationship type became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date. */ public Date getEffectiveDate() { return effectiveDate; } public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } /** * Date and time that this LO to LO relationship type expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date. */ public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } /** * List of key/value pairs, typically used for dynamic attributes. */ public Map getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for the LO to LO relation type. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> programRequirements; @XmlElement @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class) private Map attributes; @XmlElement private MetaInfo metaInfo; @XmlAttribute private String type; @XmlAttribute private String state; @XmlAttribute private String id; /** * Identifier of the credential program under which the minor belongs */ public String getCredentialProgramId() { return credentialProgramId; } public void setCredentialProgramId(String credentialProgramId) { this.credentialProgramId = credentialProgramId; } /** * Minor Discipline Program Requirements. */ public List getProgramRequirements() { if (programRequirements == null) { programRequirements = new ArrayList(0); } return programRequirements; } public void setProgramRequirements(List programRequirements) { this.programRequirements = programRequirements; } /** * List of key/value pairs, typically used for dynamic attributes. */ public Map getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning unit type. Once set at create time, this field may not be updated. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the credential program. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for an Minor Discipline. This is optional, due to the identifier being set at the time of creation. Once the Program has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for an LU document relationship type. Describes the type of usage of the document. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the LU to document relationship. The values for this field are constrained to those in the luDocRelationState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a LU to document relation. This is optional, due to the identifier being set at the time of creation. Once the connection has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> changeSection = ProgramRegistry.getSection(); if (changeSection != null) { showView(changeSection); ProgramRegistry.setSection(null); } else { String id = getStringProperty(ProgramConstants.ID); if (id == null) { showView(ProgramSections.PROGRAM_DETAILS_EDIT); } else { showView(ProgramSections.SUMMARY); } } } @Override public void beforeShow(final Callback onReadyCallback) { if(!initialized){ Application.getApplicationContext().clearCrossConstraintMap(null); Application.getApplicationContext().clearPathToFieldMapping(null); } //Clear the parent path again Application.getApplicationContext().setParentPath(""); super.beforeShow(onReadyCallback); } //Before show is called before the model is bound to the widgets. We need to update cross constraints after widget binding //This gets called twice which is not optimal @Override public > void showView(V viewType, final Callback onReadyCallback) { Callback updateCrossConstraintsCallback = new Callback(){ public void exec(Boolean result) { onReadyCallback.exec(result); for(HasCrossConstraints crossConstraint:Application.getApplicationContext().getCrossConstraints(null)){ crossConstraint.reprocessWithUpdatedConstraints(); } showWarnings(); } }; super.showView(viewType, updateCrossConstraintsCallback); } ]]> getSearchCriteriaTypes() throws OperationFailedException { return searchManager.getSearchCriteriaTypes(); } @Override public SearchResultTypeInfo getSearchResultType(String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchResultType(searchResultTypeKey); } @Override public List getSearchResultTypes() throws OperationFailedException { return searchManager.getSearchResultTypes(); } @Override public SearchTypeInfo getSearchType(String searchTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchTypeKey, "searchTypeKey"); return searchManager.getSearchType(searchTypeKey); } @Override public List getSearchTypes() throws OperationFailedException { return searchManager.getSearchTypes(); } @Override public List getSearchTypesByCriteria( String searchCriteriaTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchCriteriaTypeKey, "searchCriteriaTypeKey"); return searchManager.getSearchTypesByCriteria(searchCriteriaTypeKey); } @Override public List getSearchTypesByResult( String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchTypesByResult(searchResultTypeKey); } @Override public SearchResult search(SearchRequest searchRequest) throws MissingParameterException { return searchManager.search(searchRequest, enumDAO); ]]> > impl = map.entrySet().iterator(); return new Iterator() { Map.Entry current; @Override public boolean hasNext() { return impl.hasNext(); } @Override public Property next() { final Map.Entry entry = impl.next(); current = entry; return new Property() { @Override public T getKey() { return (T) entry.getKey().get(); } @Override public Class getKeyType() { return entry.getKey().getType(); } @Override public T getValue() { return (T) entry.getValue().get(); } @Override public Class getValueType() { return entry.getValue().getType(); } @Override public Key getWrappedKey() { return entry.getKey(); } @Override public Value getWrappedValue() { return entry.getValue(); } }; } @Override public void remove() { impl.remove(); QueryPath path = getQueryPath(); path.add(current.getKey()); execChangeCallbacks(ChangeType.REMOVE, path); } }; } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a tag type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the tag. The values for this field are constrained to those in the tagState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a tag. This is optional, due to the identifier being set at the time of creation. Once the tag has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getSelectedItems() { return selectItemWidget.getSelectedItems(); } /** * @see org.kuali.student.common.ui.client.widgets.list.KSSelectItemWidgetAbstract#selectItem(java.lang.String) */ public void selectItem(String id) { selectItemWidget.selectItem(id); } public void setListItems(ListItems listItems) { selectItemWidget.setListItems(listItems); } /** * Use to set number of columns to use when displaying list * */ public void setColumnSize(int cols){ selectItemWidget.setColumnSize(cols); } public void setMultipleSelect(boolean isMultipleSelect) {} /** * This overridden method is not used * * @see org.kuali.student.common.ui.client.widgets.list.KSSelectItemWidgetAbstract#onLoad() */ @Override public void onLoad() {} public HandlerRegistration addSelectionChangeHandler(SelectionChangeHandler handler) { return selectItemWidget.addSelectionChangeHandler(handler); } public ListItems getListItems() { return selectItemWidget.getListItems(); } public String getName() { return selectItemWidget.getName(); } public void setName(String name) { selectItemWidget.setName(name); } @Override public void setEnabled(boolean b) { selectItemWidget.setEnabled(b); } @Override public boolean isEnabled() { return selectItemWidget.isEnabled(); } @Override public boolean isMultipleSelect() { return selectItemWidget.isMultipleSelect(); } @Override public void redraw() { selectItemWidget.redraw(); } @Override public void clear() { selectItemWidget.clear(); } @Override public HandlerRegistration addFocusHandler(FocusHandler handler) { ]]> getSelectedRows() { List rows = new ArrayList(); Set selectedRows = pagingScrollTable.getDataTable() .getSelectedRows(); for (Integer i : selectedRows) { rows.add(pagingScrollTable.getRowValue(i)); } return rows; } public List getSelectedIds() { List ids = new ArrayList(); Set selectedRows = pagingScrollTable.getDataTable() .getSelectedRows(); for (Integer i : selectedRows) { ids.add(pagingScrollTable.getRowValue(i).getId()); } return ids; } public List getAllIds() { List ids = new ArrayList(); for (ResultRow r : resultRows) { ids.add(r.getId()); } return ids; } public List getAllRows() { List rows = new ArrayList(); for (ResultRow r : resultRows) { rows.add(r); } return rows; } ]]> attributes; @XmlAttribute(name="key") private String id; /** * Friendly name of the LU document relationship type */ public String getName() { return name; } public void setName(String name) { this.name = name; } /** * Narrative description of the LU document relationship type */ public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } /** * Date and time that this LU document relationship type became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date. */ public Date getEffectiveDate() { return effectiveDate; } public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } /** * Date and time that this LU document relationship type expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date. */ public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } /** * List of key/value pairs, typically used for dynamic attributes. */ public Map getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * The page luDocumentTypeKey Structure does not exist. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> attributes; @XmlAttribute(name="key") private String id; /** * Name of the scale. */ public String getName() { return name; } public void setName(String name) { this.name = name; } /** * Description of the scale. */ public RichTextInfo getDesc() { return desc; } public void setDesc(RichTextInfo desc) { this.desc = desc; } /** * Date and time that this scale became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date. */ public Date getEffectiveDate() { return effectiveDate; } public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } /** * Date and time that this scale expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date. */ public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } /** * List of key/value pairs, typically used for dynamic attributes. */ public Map getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a scale. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> attributes; @XmlAttribute(name="key") private String id; /** * Friendly name for a person type. */ public String getName() { return name; } public void setName(String name) { this.name = name; } /** * Narrative description for a person type. */ public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } /** * Date and time that this person type became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date. */ public Date getEffectiveDate() { return effectiveDate; } public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } /** * Date and time that this person type expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date. */ public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } /** * List of key/value pairs, typically used for dynamic attributes. */ public Map getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a person type. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getOrganizationIdsFromDocumentContent(RouteContext context) { String baseXpathExpression = "/" + KEWConstants.DOCUMENT_CONTENT_ELEMENT + "/" + KEWConstants.APPLICATION_CONTENT_ELEMENT + "/" + DOCUMENT_CONTENT_XML_ROOT_ELEMENT_NAME; String orgXpathExpression = "./" + getOrganizationIdDocumentContentFieldKey(context); Document xmlContent = context.getDocumentContent().getDocument(); XPath xPath = XPathHelper.newXPath(); try { NodeList baseElements = (NodeList) xPath.evaluate(baseXpathExpression, xmlContent, XPathConstants.NODESET); if (LOG.isDebugEnabled()) { LOG.debug("Found " + baseElements.getLength() + " baseElements to parse for AttributeSets using document XML:"); XmlHelper.printDocumentStructure(xmlContent); } Set distinctiveOrganizationIds = new HashSet(); for (int i = 0; i < baseElements.getLength(); i++) { Node baseNode = baseElements.item(i); NodeList attributes = (NodeList) xPath.evaluate(orgXpathExpression, baseNode, XPathConstants.NODESET); for (int j = 0; j < attributes.getLength(); j++) { Element attributeElement = (Element) attributes.item(j); distinctiveOrganizationIds.add(attributeElement.getTextContent()); } } return distinctiveOrganizationIds; } catch (XPathExpressionException e) { throw new RuntimeException("Encountered an issue executing XPath.", e); } } protected List cocAttributeSetsFromAncestors(String orgId, String orgType, String orgIdKey) { ]]> getSearchCriteriaTypes() throws OperationFailedException { return searchManager.getSearchCriteriaTypes(); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchResultType(java.lang.String) */ @Override public SearchResultTypeInfo getSearchResultType(String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchResultType(searchResultTypeKey); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchResultTypes() */ @Override public List getSearchResultTypes() throws OperationFailedException { return searchManager.getSearchResultTypes(); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchType(java.lang.String) */ @Override public SearchTypeInfo getSearchType(String searchTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchTypeKey, "searchTypeKey"); return searchManager.getSearchType(searchTypeKey); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchTypes() */ @Override public List getSearchTypes() throws OperationFailedException { return searchManager.getSearchTypes(); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchTypesByCriteria(java.lang.String) */ @Override public List getSearchTypesByCriteria( String searchCriteriaTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchCriteriaTypeKey, "searchCriteriaTypeKey"); return searchManager.getSearchTypesByCriteria(searchCriteriaTypeKey); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchTypesByResult(java.lang.String) */ @Override public List getSearchTypesByResult( String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchTypesByResult(searchResultTypeKey); } @Override ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = modelDefinition.getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } ]]> * It is needed because we need to make separate web service calls to update the state of these objects. * * @param majorDisciplineInfo * @param newState */ private void updateMajorDisciplineInfoState(MajorDisciplineInfo majorDisciplineInfo, String newState) throws Exception { // Update the statement tree List programRequirementIds = majorDisciplineInfo.getProgramRequirements(); updateRequirementsState(programRequirementIds, newState); // Update any variations List variationList = majorDisciplineInfo.getVariations(); updateVariationsRequirementsState(variationList, newState); // Update major discipline majorDisciplineInfo.setState(newState); programService.updateMajorDiscipline(majorDisciplineInfo); } /** * This method will make this version of the major discipline the current one. * * @param majorDisciplineInfo */ private void makeCurrent(MajorDisciplineInfo majorDisciplineInfo) throws Exception { // Check if this is the current version before trying to make it current // (the web service will error if you try to make a version current that is already current) VersionDisplayInfo currentVersion = programService.getCurrentVersion(ProgramServiceConstants.PROGRAM_NAMESPACE_MAJOR_DISCIPLINE_URI, majorDisciplineInfo.getVersionInfo().getVersionIndId()); // If this is not the current version, then make it current if (!currentVersion.getSequenceNumber().equals(majorDisciplineInfo.getVersionInfo().getSequenceNumber())) { programService.setCurrentMajorDisciplineVersion(majorDisciplineInfo.getId(), null); } } /** * This method finds all previous versions of program and sets all previous ACTIVE,APPROVED,DRAFT versions to SUPERSEDED and * sets new end terms for previous current version. * @param majorDisciplineInfo The version of major discipline program being activated * @param endEntryTerm The new end entry term to set on previous active version * @param endEnrollTerm The new end enroll term to set on previous active version * @throws Exception */ private void updatePreviousVersions (MajorDisciplineInfo selectedVersion, String endEntryTerm, String endEnrollTerm, String endInstAdmitTerm) throws Exception { // Get the current version of major discipline given the selected version MajorDisciplineInfo currentVersion = getCurrentVersion(selectedVersion); boolean isSelectedVersionCurrent = selectedVersion.getId().equals(currentVersion.getId()); ]]> loNode = loAssembler .disassemble(loDisplay, NodeOperation.UPDATE); results.add(loNode); // remove this entry from the map so we can tell what needs to // be deleted at the end currentCluLoRelations.remove(loDisplay.getLoInfo().getId()); } else if (NodeOperation.DELETE == operation && currentCluLoRelations.containsKey(loDisplay.getLoInfo().getId())) { // Delete the Format and its relation CluLoRelationInfo relationToDelete = currentCluLoRelations.get(loDisplay.getLoInfo().getId()); BaseDTOAssemblyNode relationToDeleteNode = new BaseDTOAssemblyNode( null); relationToDeleteNode.setNodeData(relationToDelete); relationToDeleteNode.setOperation(NodeOperation.DELETE); results.add(relationToDeleteNode); BaseDTOAssemblyNode loNode = loAssembler .disassemble(loDisplay, NodeOperation.DELETE); results.add(loNode); // remove this entry from the map so we can tell what needs to // be deleted at the end currentCluLoRelations.remove(loDisplay.getLoInfo().getId()); } } // Now any leftover lo ids are no longer needed, so delete // los and relations for (Entry entry : currentCluLoRelations.entrySet()) { // Create a new relation with the id of the relation we want to // delete CluLoRelationInfo relationToDelete = entry.getValue(); BaseDTOAssemblyNode relationToDeleteNode = new BaseDTOAssemblyNode( null); relationToDeleteNode.setNodeData(relationToDelete); relationToDeleteNode.setOperation(NodeOperation.DELETE); results.add(relationToDeleteNode); ]]> getSearchCriteriaTypes() throws OperationFailedException { return searchManager.getSearchCriteriaTypes(); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchResultType(java.lang.String) */ @Override public SearchResultTypeInfo getSearchResultType(String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchResultType(searchResultTypeKey); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchResultTypes() */ @Override public List getSearchResultTypes() throws OperationFailedException { return searchManager.getSearchResultTypes(); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchType(java.lang.String) */ @Override public SearchTypeInfo getSearchType(String searchTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchTypeKey, "searchTypeKey"); return searchManager.getSearchType(searchTypeKey); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchTypes() */ @Override public List getSearchTypes() throws OperationFailedException { return searchManager.getSearchTypes(); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchTypesByCriteria(java.lang.String) */ @Override public List getSearchTypesByCriteria( String searchCriteriaTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchCriteriaTypeKey, "searchCriteriaTypeKey"); return searchManager.getSearchTypesByCriteria(searchCriteriaTypeKey); } /* (non-Javadoc) * @see org.kuali.student.common.search.service.SearchService#getSearchTypesByResult(java.lang.String) */ @Override public List getSearchTypesByResult( String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchTypesByResult(searchResultTypeKey); } @Override ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } private VerticalSection createReadOnlySection() { VerticalSection section = new VerticalSection(); configurer.addReadOnlyField(section, ProgramConstants.PROPOSAL_TITLE_PATH, generateMessageInfo(ProgramMsgConstants.PROPOSALINFORMATION_CLUPROGRAMTITLE)); ]]> getSearchCriteriaTypes() throws OperationFailedException { return searchManager.getSearchCriteriaTypes(); } @Override public SearchResultTypeInfo getSearchResultType(String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchResultType(searchResultTypeKey); } @Override public List getSearchResultTypes() throws OperationFailedException { return searchManager.getSearchResultTypes(); } @Override public SearchTypeInfo getSearchType(String searchTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchTypeKey, "searchTypeKey"); return searchManager.getSearchType(searchTypeKey); } @Override public List getSearchTypes() throws OperationFailedException { return searchManager.getSearchTypes(); } @Override public List getSearchTypesByCriteria( String searchCriteriaTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchCriteriaTypeKey, "searchCriteriaTypeKey"); return searchManager.getSearchTypesByCriteria(searchCriteriaTypeKey); } @Override public List getSearchTypesByResult( String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchTypesByResult(searchResultTypeKey); } public SearchManager getSearchManager() { ]]> getSearchCriteriaTypes() throws OperationFailedException { return searchManager.getSearchCriteriaTypes(); } @Override public SearchResultTypeInfo getSearchResultType(String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchResultType(searchResultTypeKey); } @Override public List getSearchResultTypes() throws OperationFailedException { return searchManager.getSearchResultTypes(); } @Override public SearchTypeInfo getSearchType(String searchTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchTypeKey, "searchTypeKey"); return searchManager.getSearchType(searchTypeKey); } @Override public List getSearchTypes() throws OperationFailedException { return searchManager.getSearchTypes(); } @Override public List getSearchTypesByCriteria( String searchCriteriaTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchCriteriaTypeKey, "searchCriteriaTypeKey"); return searchManager.getSearchTypesByCriteria(searchCriteriaTypeKey); } @Override public List getSearchTypesByResult( String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchTypesByResult(searchResultTypeKey); } ]]> okCallback) { programRemoteService.saveData(programModel.getRoot(), new AbstractCallback(getLabel(ProgramMsgConstants.COMMON_SAVINGDATA)) { @Override public void onSuccess(DataSaveResult result) { super.onSuccess(result); //Clear warning states on field and any warnings stored in ApplicationContext; clearAllWarnings(); Application.getApplicationContext().clearValidationWarnings(); List validationResults = result.getValidationResults(); Application.getApplicationContext().addValidationWarnings(validationResults); if (ValidatorClientUtils.hasErrors(validationResults)) { ProgramUtils.retrofitValidationResults(validationResults); isValid(validationResults, false, true); ProgramUtils.handleValidationErrorsForSpecializations(validationResults, programModel); //Clean up anything created by earlier code Data currentVariations = getDataProperty(ProgramConstants.VARIATIONS); existingVariationIds.clear(); for (Iterator iter = currentVariations.iterator();iter.hasNext();) { Property prop = iter.next(); String existingId = (String) ((Data) prop.getValue()).get(ProgramConstants.ID); if(existingId==null){ iter.remove(); }else{ existingVariationIds.add(existingId); } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a credit type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The page creditId Structure does not exist. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> links){ for(KSLabel link: links){ FocusPanel panel = new FocusPanel(); panel.setWidget(link); //headerTopLinks.add(panel); panel.addStyleName("KS-Wrapper-Header-Custom-Link-Panel"); link.addStyleName("KS-Wrapper-Header-Custom-Link"); } } public void setFooterLinks(List links){ for(KSLabel link: links){ //footer.add(link); link.addStyleName("KS-Wrapper-Footer-Link"); } } private KSLabel buildLink(final String text, final String title, final String actionUrl) { //Using KSLabel for now - couldn't change color for Anchor final KSLabel link = new KSLabel(text); link.addStyleName("KS-Header-Link"); link.setTitle(title); link.addMouseOverHandler(new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { link.addStyleName("KS-Header-Link-Focus"); }}); link.addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { link.removeStyleName("KS-Header-Link-Focus"); }}); link.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.Location.assign(actionUrl); }}); return link; } ]]> getSelectedRows() { List rows = new ArrayList(); Set selectedRows = pagingScrollTable.getDataTable() .getSelectedRows(); for (Integer i : selectedRows) { rows.add(pagingScrollTable.getRowValue(i)); } return rows; } public List getSelectedIds() { List ids = new ArrayList(); Set selectedRows = pagingScrollTable.getDataTable() .getSelectedRows(); for (Integer i : selectedRows) { ids.add(pagingScrollTable.getRowValue(i).getId()); } return ids; } public List getAllIds() { List ids = new ArrayList(); for (ResultRow r : resultRows) { ids.add(r.getId()); } return ids; } public List getAllRows() { List rows = new ArrayList(); for (ResultRow r : resultRows) { rows.add(r); } return rows; } public List getAllResults() { ]]> getDivisionsContentOwner() { return divisionsContentOwner; } public void setDivisionsContentOwner(List divisionsContentOwner) { this.divisionsContentOwner = divisionsContentOwner; } /** * Divisions responsible for student exceptions to the credential program. */ public List getDivisionsStudentOversight() { return divisionsStudentOversight; } public void setDivisionsStudentOversight(List divisionsStudentOversight) { this.divisionsStudentOversight = divisionsStudentOversight; } /* * Unit responsible to make changes to the credential program */ public List getUnitsContentOwner() { return unitsContentOwner; } public void setUnitsContentOwner(List unitsContentOwner) { this.unitsContentOwner = unitsContentOwner; } /** * Unit responsible for student exceptions to the credential program. */ public List getUnitsStudentOversight() { return unitsStudentOversight; } public void setUnitsStudentOversight(List unitsStudentOversight) { this.unitsStudentOversight = unitsStudentOversight; } /** * Narrative description of the Credential program. */ public RichTextInfo getDescr() { return descr; } public void setDescr(RichTextInfo descr) { this.descr = descr; } /** * Learning Objectives associated with this credential program. */ public List getLearningObjectives() { ]]> getSelectedRows(){ List rows = new ArrayList(); Set selectedRows = pagingScrollTable.getDataTable().getSelectedRows(); for(Integer i: selectedRows){ rows.add(pagingScrollTable.getRowValue(i)); } return rows; } public List getSelectedIds(){ List ids = new ArrayList(); Set selectedRows = pagingScrollTable.getDataTable().getSelectedRows(); for(Integer i: selectedRows){ ids.add(pagingScrollTable.getRowValue(i).getId()); } return ids; } public List getAllIds(){ List ids = new ArrayList(); for(ResultRow r: resultRows){ ids.add(r.getId()); } return ids; } public List getAllRows(){ List rows = new ArrayList(); for(ResultRow r: resultRows){ rows.add(r); } return rows; } ]]> elements into straight spring elements private Element getChildList(Element element, String localName) { try{ //Create a new document to contain our list of elements DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = dbf.newDocumentBuilder(); Document doc = builder.newDocument(); Element root = doc.createElement("listRoot"); for(int i = 0;i binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } } ]]> comparisonModelCallback = new ModelRequestCallback() { @Override public void onModelReady(DataModel model) { majorDisciplineService.getData((String)model.get("versionInfo/versionedFromId"), new AbstractCallback(getLabel(ProgramMsgConstants.COMMON_RETRIEVINGDATA)) { @Override public void onSuccess(Data result) { super.onSuccess(result); comparisonModel.setRoot(result); reqDataModel.retrieveProgramRequirements(MajorProposalController.this, ProgramConstants.PROGRAM_MODEL_ID, new Callback() { @Override public void exec(Boolean result) { if (result) { reqDataModelComp.retrieveProgramRequirements(MajorProposalController.this, comparisonModelId, new Callback() { @Override public void exec(Boolean result) { if (result) { callback.onModelReady(comparisonModel); } } }); } } }); } @Override public void onFailure(Throwable caught) { super.onFailure(caught); callback.onRequestFail(caught); } }); } @Override public void onRequestFail(Throwable cause) { GWT.log("Unable to retrieve comparison model", cause); } }; ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } } ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } } ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } } ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } } ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } ]]> permissions = permissionService.getAuthorizedPermissionsByTemplateName(principalId, PermissionType.FIELD_ACCESS.getPermissionNamespace(), PermissionType.FIELD_ACCESS.getPermissionTemplateName(), permissionDetails, qualification); Map permMap = new HashMap(); if (permissions != null) { for (KimPermissionInfo permission : permissions) { String dtoFieldKey = permission.getDetails().get("dtoFieldKey"); String fieldAccessLevel = permission.getDetails().get("fieldAccessLevel"); permMap.put(dtoFieldKey, fieldAccessLevel); } } return permMap; } catch (Exception e) { LOG.warn("Error calling permission service.", e); } return null; } /** * Sets the metadata node and all it's children to readOnly (i.e. canEdit=false). * * @param metadata * @param readOnly */ private void setReadOnly(Metadata metadata, boolean readOnly) { metadata.setCanEdit(!readOnly); Map childProperties = metadata.getProperties(); if (childProperties != null && childProperties.size() > 0) { for (Metadata child : childProperties.values()) { setReadOnly(child, readOnly); } } } ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { fd2.setWidgetBinding(binding); } fd2.setOptional(optional); SummaryTableFieldRow fieldRow = new SummaryTableFieldRow(fd, fd2); return fieldRow; } ]]> onReadyCallback) { Map idAttributes = new HashMap(); ViewContext viewContext = getViewContext(); IdType idType = viewContext.getIdType(); String viewContextId = null; if (idType != null) { idAttributes.put(IdAttributes.ID_TYPE, idType.toString()); viewContextId = viewContext.getId(); if (idType == IdType.COPY_OF_OBJECT_ID) { viewContextId = null; } } if (programModel.getRoot() != null) { ProgramStatus programStatus = ProgramStatus.of(programModel); idAttributes.put(DtoConstants.DTO_STATE, programStatus.getValue()); if (programStatus.getNextStatus() != null) { idAttributes.put(DtoConstants.DTO_NEXT_STATE, programStatus.getNextStatus().getValue()); } } programRemoteService.getMetadata(viewContextId, idAttributes, new AbstractCallback() { @Override public void onSuccess(Metadata result) { super.onSuccess(result); DataModelDefinition def = new DataModelDefinition(result); programModel.setDefinition(def); ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Type of publication for which this information should be used. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * Current state of the information for this publication type. This value should be constrained to those within the cluPublishingState enumeration. In general, an "active" record for a type indicates that the clu should be published within that media, though that may be further constrained by the cycle information included. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Identifier for the publishing information. This is set by the service to be able to determine changes and alterations to the structure as well as provides a handle for searches. This structure is not currently accessible through unique operations, and it is strongly recommended that no external references to this particular identifier be maintained. */ public String getId() { return id; } public void setId(String id) { this.id = id; } @Override public String toString() { return "CluPublicationInfo[id=" + id + ", cluId=" + cluId + ", type=" + type + "]"; ]]> widgetOptions; public Map getWidgetOptions() { return widgetOptions; } public void setWidgetOptions(Map widgetOptions) { this.widgetOptions = widgetOptions; } public String getWidgetOptionValue(WidgetOption widgetOption) { if (widgetOptions == null) return null; return widgetOptions.get(widgetOption); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public List getResults() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for the LU to LU relation type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the LUI to LUI relationship. The values for this field are constrained to those in the luLuRelationState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a LUI to LUI relation. This is optional, due to the identifier being set at the time of creation. Once the relation has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning unit type. Once set at create time, this field may not be updated. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the course. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. This field may not be updated through updating this structure and must instead be updated through a dedicated operation. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a Course. This is optional, due to the identifier being set at the time of creation. Once the Course has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } public VersionInfo getVersionInfo() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning objective category type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the learning objective category. The values for this field are constrained to those in the loCategoryState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a learning objective category record. This is optional, due to the identifier being set at the time of creation. Once the learning objective category has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a date range type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the date range. The values for this field are constrained to those in the dateRangeState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a date range. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getKeyValues() { List departments = new ArrayList(); SearchRequest searchRequest = new SearchRequest(); searchRequest.setSearchKey("org.search.generic"); try { for (SearchResultRow result : getOrganizationService().search(searchRequest).getRows()) { String orgId = ""; String orgShortName = ""; String orgOptionalLongName = ""; String orgType = ""; for (SearchResultCell resultCell : result.getCells()) { if ("org.resultColumn.orgId".equals(resultCell.getKey())) { orgId = resultCell.getValue(); } else if ("org.resultColumn.orgShortName".equals(resultCell.getKey())) { orgShortName = resultCell.getValue(); } else if ("org.resultColumn.orgOptionalLongName".equals(resultCell.getKey())) { orgOptionalLongName = resultCell.getValue(); } else if ("org.resultColumn.orgType".equals(resultCell.getKey())) { orgType = resultCell.getValue(); } } departments.add(buildKeyLabelPair(orgId, orgShortName, orgOptionalLongName, orgType)); } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning objective type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the learning objective. The values for this field are constrained to those in the loState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a learning objective record. This is optional, due to the identifier being set at the time of creation. Once the learning objective has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } ]]> (){ @Override public void handleFailure(Throwable caught) { ]]> onReadyCallback) { if(!initialized){ Application.getApplicationContext().clearCrossConstraintMap(null); Application.getApplicationContext().clearPathToFieldMapping(null); } //Clear the parent path again Application.getApplicationContext().setParentPath(""); super.beforeShow(onReadyCallback); } //Before show is called before the model is bound to the widgets. We need to update cross constraints after widget binding //This gets called twice which is not optimal @Override public > void showView(V viewType, final Callback onReadyCallback) { Callback updateCrossConstraintsCallback = new Callback(){ public void exec(Boolean result) { onReadyCallback.exec(result); for(HasCrossConstraints crossConstraint:Application.getApplicationContext().getCrossConstraints(null)){ crossConstraint.reprocessWithUpdatedConstraints(); } showWarnings(); } }; super.showView(viewType, updateCrossConstraintsCallback); } } ]]> onReadyCallback) { if(!initialized){ Application.getApplicationContext().clearCrossConstraintMap(null); Application.getApplicationContext().clearPathToFieldMapping(null); } //Clear the parent path again Application.getApplicationContext().setParentPath(""); super.beforeShow(onReadyCallback); } //Before show is called before the model is bound to the widgets. We need to update cross constraints after widget binding //This gets called twice which is not optimal @Override public > void showView(V viewType, final Callback onReadyCallback) { Callback updateCrossConstraintsCallback = new Callback(){ public void exec(Boolean result) { onReadyCallback.exec(result); for(HasCrossConstraints crossConstraint:Application.getApplicationContext().getCrossConstraints(null)){ crossConstraint.reprocessWithUpdatedConstraints(); } showWarnings(); } }; super.showView(viewType, updateCrossConstraintsCallback); } ]]> statements = tree.getStatements(); List reqComponentInfos = tree.getReqComponents(); if ((statements != null) && (statements.size() > 0)) { // retrieve all statements for (StatementTreeViewInfo statement : statements) { setReqCompNL(statement); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // retrieve all req. component LEAFS for (int i = 0; i < reqComponentInfos.size(); i++) { ReqComponentInfoUi reqUi = RulesUtil.clone(reqComponentInfos.get(i)); reqUi.setNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE", "en")); reqUi.setPreviewNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE.PREVIEW", "en")); reqComponentInfos.set(i, reqUi); } } } ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { ]]> id, FilterParamWrapper response, GetFilterChain chain) throws AssemblyException { chain.doGetFilter(id, response); Data data = response.getValue(); if (data != null) { translateIds(data, chain); } } @Override public void doSaveFilter(FilterParamWrapper request, FilterParamWrapper> response, SaveFilterChain chain) throws AssemblyException { chain.doSaveFilter(request, response); SaveResult saveResult = response.getValue(); Data data = saveResult != null && saveResult.getValue() != null ? saveResult.getValue() : null; if(data != null) { translateIds(data, chain); } } private void translateIds(Data data, AssemblerManagerAccessable chain) throws AssemblyException { ]]> statements = tree.getStatements(); List reqComponentInfos = tree.getReqComponents(); if ((statements != null) && (statements.size() > 0)) { // retrieve all statements for (StatementTreeViewInfo statement : statements) { setReqCompNL(statement); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // retrieve all req. component LEAFS for (int i = 0; i < reqComponentInfos.size(); i++) { ReqComponentInfoUi reqUi = RulesUtil.clone(reqComponentInfos.get(i)); reqUi.setNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE", "en")); reqUi.setPreviewNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE.PREVIEW", "en")); reqComponentInfos.set(i, reqUi); } } } @Override public Boolean isLatestVersion(String versionIndId, Long versionSequenceNumber) throws Exception { ]]> binding, boolean optional) { QueryPath path = QueryPath.concat(parentPath, fieldKey); Metadata meta = configurer.getModelDefinition().getMetadata(path); FieldDescriptorReadOnly fd = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget != null) { fd.setFieldWidget(widget); } if (binding != null) { fd.setWidgetBinding(binding); } fd.setOptional(optional); FieldDescriptorReadOnly fd2 = new FieldDescriptorReadOnly(path.toString(), messageKey, meta); if (widget2 != null) { fd2.setFieldWidget(widget2); } if (binding != null) { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } public VersionInfo getVersionInfo() { return versionInfo; } public void setVersionInfo(VersionInfo versionInfo) { this.versionInfo = versionInfo; } /** * Unique identifier for a learning unit type. Once set at create time, this field may not be updated. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the credential program. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for an Core Program Requirement. This is optional, due to the identifier being set at the time of creation. Once the Program has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } /** * Abbreviated name of the Core requirement */ public String getShortTitle() { ]]> divisionsContentOwner; @XmlElement private List divisionsStudentOversight; @XmlElement private List divisionsDeployment; @XmlElement private List divisionsFinancialResources; @XmlElement private List divisionsFinancialControl; @XmlElement private List unitsContentOwner; @XmlElement private List unitsStudentOversight; @XmlElement private List unitsDeployment; @XmlElement private List unitsFinancialResources; @XmlElement private List unitsFinancialControl; @XmlElement @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class) private Map attributes; @XmlElement private MetaInfo metaInfo; @XmlElement private VersionInfo versionInfo; @XmlAttribute private String type; @XmlAttribute private String state; @XmlAttribute private String id; /** * Indicates if the program is full time, part time, both etc */ public String getIntensity() { return intensity; } public void setIntensity(String intensity) { this.intensity = intensity; } /** * An URL for additional information about the Variation. */ public String getReferenceURL() { return referenceURL; } public void setReferenceURL(String referenceURL) { this.referenceURL = referenceURL; } /** * The composite string that is used to officially reference or publish the Variation. Note it may have an internal structure that each Institution may want to enforce. */ public String getCode() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * The current status of the LUI. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a Learning Unit Instance (LUI). This is optional, due to the identifier being set at the time of creation. Once the LUI has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> selected = SwitchSection.this.selectableWidget.getSelectedItems(); for(int i = 0; i < selected.size(); i++){ String key = selected.get(i); showSwappableSection(key); } Iterator it = swapSectionMap.keySet().iterator(); while(it.hasNext()){ String key = it.next(); if(!selected.contains(key)){ removeSwappableSection(key); } } } private void showSwappableSection(String key){ Section section = swapSectionMap.get(key); if(section != null){ if(deleted.contains(section)){ deleted.remove(section); } if(!section.getLayout().isVisible()){ section.enableValidation(true); section.getLayout().setVisible(true); } } ]]> >() { @Override public void exec(List result) { SelectedResults value = result.get(0); ViewContext viewContext = new ViewContext(); viewContext.setId(value.getResultRow().getId()); String cluType = value.getResultRow().getValue("lu.resultColumn.luOptionalType"); if (cluType != null) { viewContext.setAttribute(ProgramConstants.TYPE, cluType); } viewContext.setIdType(IdType.OBJECT_ID); ProgramRegistry.setCreateNew(true); Application.navigate(AppLocations.Locations.VIEW_CORE_PROGRAM.getLocation(), viewContext); ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } @Override public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning unit type. Once set at create time, this field may not be updated. */ @Override public String getType() { return type; } @Override public void setType(String type) { this.type = type; } /** * The current status of the credential program. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ @Override public String getState() { return state; } @Override public void setState(String state) { this.state = state; } /** * Unique identifier for a Program Requirement This is optional, due to the identifier being set at the time of creation. Once the Program has been created, this should be seen as required. */ @Override public String getId() { return id; } @Override public void setId(String id) { this.id = id; } ]]> statements = tree.getStatements(); List reqComponentInfos = tree.getReqComponents(); if ((statements != null) && (statements.size() > 0)) { // retrieve all statements for (StatementTreeViewInfo statement : statements) { setReqCompNL(statement); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // retrieve all req. component LEAFS for (int i = 0; i < reqComponentInfos.size(); i++) { ReqComponentInfoUi reqUi = RulesUtil.clone(reqComponentInfos.get(i)); reqUi.setNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE", "en")); reqUi.setPreviewNaturalLanguageTranslation(statementService.translateReqComponentToNL(reqUi, "KUALI.RULE.PREVIEW", "en")); reqComponentInfos.set(i, reqUi); } } } ]]> * At the moment, it is used by the UI to decide if we should hide the action box when * opening a draft proposal. * * @see org.kuali.student.lum.program.client.rpc.MajorDisciplineRpcService#isProposal(java.lang.String, java.lang.String) */ @Override public Boolean isProposal(String referenceTypeKey, String referenceId){ try { // Wire in proposal service from spring // Call method getProposalByReference(). // ProposalWorkflowFilter.applyOutboundDataFilter(). Set on line 130-131. Use these for reference ID. // Ask the proposal service to return a list of proposals with this reference id List proposals = proposalService.getProposalsByReference(referenceTypeKey, referenceId); // If at least one proposal is returned, this is a proposal, so return true if (proposals != null && proposals.size() >= 1){ return new Boolean(true); } // This was not a proposal, so return false return new Boolean(false); } catch(Exception ex){ // Log exception ex.printStackTrace(); throw new RuntimeException(ex); } } /** * * Proposal service is injected by spring in the lum-gwt-context.xml file * * @return */ public ProposalService getProposalService() { return proposalService; } public void setProposalService(ProposalService proposalService) { this.proposalService = proposalService; } public void setLuService(LuService luService) { this.luService = luService; } } ]]> listOne = new ArrayList(); listOne.add( KimAttributes.DOCUMENT_NUMBER ); newRequiredAttributes.add(listOne); // add document type name and KEW application id as one required attribute set List listTwo = new ArrayList(); listTwo.add( KimAttributes.DOCUMENT_TYPE_NAME ); listTwo.add( StudentIdentityConstants.QUALIFICATION_KEW_OBJECT_ID ); newRequiredAttributes.add(listTwo); // add object id and object type as one required attribute set List listThree = new ArrayList(); listThree.add( StudentIdentityConstants.QUALIFICATION_KEW_OBJECT_ID ); listThree.add( StudentIdentityConstants.QUALIFICATION_KEW_OBJECT_TYPE ); newRequiredAttributes.add(listThree); // add each proposal reference type as a required attribute set for (String proposalReferenceType : StudentIdentityConstants.QUALIFICATION_PROPOSAL_ID_REF_TYPES) { List tempList = new ArrayList(); tempList.add( proposalReferenceType ); newRequiredAttributes.add(tempList); } } /** * The part about where the receivedAttributes list being empty does not return errors is copied from Rice base class. * * @see org.kuali.rice.kim.service.support.impl.KimTypeServiceBase#validateRequiredAttributesAgainstReceived(org.kuali.rice.kim.bo.types.dto.AttributeSet) **/ @Override protected void validateRequiredAttributesAgainstReceived(AttributeSet receivedAttributes){ KimQualificationHelper.validateRequiredAttributesAgainstReceived(newRequiredAttributes, receivedAttributes, isCheckFutureRequests(), COMMA_SEPARATOR); ]]> serverPropertyList = Arrays.asList(APP_URL, DOC_SEARCH_URL, LUM_APP_URL,RICE_URL,RICE_LINK_LABEL, APP_VERSION, CODE_SERVER); serverPropertiesRpcService.get(serverPropertyList, new KSAsyncCallback>() { public void handleFailure(Throwable caught) { //ignoring, we'll use the default init(); } public void onSuccess(Map result) { GWT.log("ServerProperties fetched: "+result.toString(), null); if(result != null){ appUrl = result.get(APP_URL); docSearchUrl = result.get(DOC_SEARCH_URL); lumAppUrl = result.get(LUM_APP_URL); riceURL = result.get(RICE_URL); riceLinkLabel = result.get(RICE_LINK_LABEL); appVersion = result.get(APP_VERSION); ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning objective type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the learning objective. The values for this field are constrained to those in the loState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a learning objective record. This is optional, due to the identifier being set at the time of creation. Once the learning objective has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } @Override public String toString() { return "LoInfo[id=" + id + "]"; ]]> getDetailsForWidget(ExportElement element, Widget currentViewWidget, boolean setFirstFieldValue, String viewName, String sectionName) { List childElements = new ArrayList(); if (!currentViewWidget.getParent().getElement().getStyle().getDisplay().equals("none")){ if (currentViewWidget instanceof Section) { Section widgetHasFields = (Section) currentViewWidget; List widgetFields = widgetHasFields.getFields(); for (FieldDescriptor field : widgetFields) { ExportElement exportItem = createExportElement(viewName, sectionName, childElements, field.getFieldElement().getFieldWidget()); exportItem.setFieldLabel(field.getFieldLabel()); } } else if (currentViewWidget instanceof KSListPanel) { KSListPanel ksListPanelWidget = (KSListPanel) currentViewWidget; WidgetCollection children = ksListPanelWidget.getChildren(); for (int i = 0; i < children.size(); i++) { ]]> getSearchCriteriaTypes() throws OperationFailedException { return searchManager.getSearchCriteriaTypes(); } /** * @see org.kuali.student.common.search.service.SearchService#getSearchResultType(java.lang.String) */ @Override public SearchResultTypeInfo getSearchResultType(String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchResultTypeKey, "searchResultTypeKey"); return searchManager.getSearchResultType(searchResultTypeKey); } /** * @see org.kuali.student.common.search.service.SearchService#getSearchResultTypes() */ @Override public List getSearchResultTypes() throws OperationFailedException { return searchManager.getSearchResultTypes(); } /** * @see org.kuali.student.common.search.service.SearchService#getSearchType(java.lang.String) */ @Override public SearchTypeInfo getSearchType(String searchTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { checkForMissingParameter(searchTypeKey, "searchTypeKey"); return searchManager.getSearchType(searchTypeKey); } /** * @see org.kuali.student.common.search.service.SearchService#getSearchTypes() */ @Override public List getSearchTypes() throws OperationFailedException { return searchManager.getSearchTypes(); } /** * @see org.kuali.student.common.search.service.SearchService#getSearchTypesByCriteria(java.lang.String) */ @Override public List getSearchTypesByCriteria(String searchCriteriaTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { ]]> searchParams = lookupMetadata.getParams(); if (searchParams != null) { for (LookupParamMetadata searchParam : searchParams) { if (nullSafeEquals(searchParam.getKey(), parameterKey)) { parameterDisplayName = searchParam.getName(); } } } if (parameterDisplayName == null) { parameterDisplayName = parameterKey; } } return parameterDisplayName; } private boolean nullSafeEquals(Object str1, Object str2) { return (str1 == null && str2 == null || str1 != null && str2 != null && str1.equals(str2)); } // public class MyGwtEvent extends ValueChangeEvent { // public MyGwtEvent(Data.Value value) { // super(value); // } // } public LookupMetadata getLookupMetadata() { return lookupMetadata; } public void setLookupMetadata(LookupMetadata lookupMetadata) { this.lookupMetadata = lookupMetadata; } } ]]> onReadyCallback) { if(!initialized){ Application.getApplicationContext().clearCrossConstraintMap(null); Application.getApplicationContext().clearPathToFieldMapping(null); } //Clear the parent path again Application.getApplicationContext().setParentPath(""); super.beforeShow(onReadyCallback); } //Before show is called before the model is bound to the widgets. We need to update cross constraints after widget binding //This gets called twice which is not optimal @Override public > void showView(V viewType, final Callback onReadyCallback) { Callback updateCrossConstraintsCallback = new Callback(){ public void exec(Boolean result) { onReadyCallback.exec(result); for(HasCrossConstraints crossConstraint:Application.getApplicationContext().getCrossConstraints(null)){ crossConstraint.reprocessWithUpdatedConstraints(); } showWarnings(); } }; super.showView(viewType, updateCrossConstraintsCallback); } ]]> additionalLookupMetadata; public Picker(LookupMetadata inLookupMetadata, List additionalLookupMetadata) { super(inLookupMetadata, additionalLookupMetadata); this.initLookupMetadata = inLookupMetadata; this.additionalLookupMetadata = additionalLookupMetadata; } public String getName() { return name; } public void setName(String name) { this.name = name; } public LookupMetadata getInitLookupMetadata() { return initLookupMetadata; } public void setInitLookupMetadata(LookupMetadata initLookupMetadata) { this.initLookupMetadata = initLookupMetadata; } public List getAdditionalLookupMetadata() { return additionalLookupMetadata; } public void setAdditionalLookupMetadata(List additionalLookupMetadata) { this.additionalLookupMetadata = additionalLookupMetadata; } } ]]> listIter = ((Data)fieldData).realPropertyIterator(); listIter.hasNext();){ Property listItem = listIter.next(); Object listData = listItem.getValue(); if (listData != null && listData instanceof String) { if (fieldMetadata.getInitialLookup() != null && !StringUtils.isEmpty((String) listData)) { //This is a string with a lookup so do the translation IdTranslation trans = idTranslator.getTranslation(fieldMetadata.getInitialLookup(), (String) listData); if (trans != null) { Integer index = listItem.getKey(); setTranslation((Data)fieldData, listItem.getKey().toString(), index, trans.getDisplay()); } } } ]]> list) { List statements = rule.getStatements(); List reqComponentInfos = rule.getReqComponents(); if ((statements != null) && (statements.size() > 0)) { // retrieve all statements for (StatementTreeViewInfo statement : statements) { findCluSetIds(statement, list); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // retrieve all req. component LEAFS for (ReqComponentInfo reqComponent : reqComponentInfos) { List fieldInfos = reqComponent.getReqCompFields(); for (ReqCompFieldInfo fieldInfo : fieldInfos) { if (RulesUtil.isCluSetWidget(fieldInfo.getType())) { list.add(fieldInfo.getValue()); } } } } } private void setupSaveCancelButtons() { ]]> list) { List statements = rule.getStatements(); List reqComponentInfos = rule.getReqComponents(); if ((statements != null) && (statements.size() > 0)) { // retrieve all statements for (StatementTreeViewInfo statement : statements) { findCluSetIds(statement, list); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // retrieve all req. component LEAFS for (ReqComponentInfo reqComponent : reqComponentInfos) { List fieldInfos = reqComponent.getReqCompFields(); for (ReqCompFieldInfo fieldInfo : fieldInfos) { if (RulesUtil.isCluSetWidget(fieldInfo.getType())) { list.add(fieldInfo.getValue()); } } } } } ]]> list) { List statements = rule.getStatements(); List reqComponentInfos = rule.getReqComponents(); if ((statements != null) && (statements.size() > 0)) { // retrieve all statements for (StatementTreeViewInfo statement : statements) { findCluSetIds(statement, list); // inside set the children of this statementTreeViewInfo } } else if ((reqComponentInfos != null) && (reqComponentInfos.size() > 0)) { // retrieve all req. component LEAFS for (ReqComponentInfo reqComponent : reqComponentInfos) { List fieldInfos = reqComponent.getReqCompFields(); for (ReqCompFieldInfo fieldInfo : fieldInfos) { if (RulesUtil.isCluSetWidget(fieldInfo.getType())) { list.add(fieldInfo.getValue()); } } } } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning unit type. Once set at create time, this field may not be updated. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the credential program. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for an Honors Program. This is optional, due to the identifier being set at the time of creation. Once the Program has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a grade type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * Unique identifier for a grade value. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /* * Create and last update info for the structure. * This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /* * Unique identifier for the accreditation. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning unit type. Once set at create time, this field may not be updated. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the course. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. This field may not be updated through updating this structure and must instead be updated through a dedicated operation. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a Canonical Learning Unit (CLU). This is optional, due to the identifier being set at the time of creation. Once the Format has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning objective repository. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for an organization type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the organization. The values for this field are constrained to those in the orgState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for an organization. This is optional, due to the identifier being set at the time of creation. Once the organization has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning unit type. Once set at create time, this field may not be updated. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the credential program. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for an Honors Program. This is optional, due to the identifier being set at the time of creation. Once the Program has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a CLU Set. This is optional, due to the identifier being set at the time of creation. Once the CLU Set has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for an LU statement type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the statement. The values for this field are constrained to those in the StatementState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a single LU statement record. This is optional, due to the identifier being set at the time of creation. Once the LU statement has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a CLU Set. This is optional, due to the identifier being set at the time of creation. Once the CLU Set has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for an LU statement type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * The current status of the statement. The values for this field are constrained to those in the StatementState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a single LU statement record. This is optional, due to the identifier being set at the time of creation. Once the LU statement has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } ]]> (){ public void onValueChange(ValueChangeEvent event) { if(event.getValue()){ curriculumReviewOption.setEnabled(false); curriculumReviewOption.setValue(false); } } }); radioOptionModifyNoVersion.setValue(true); curriculumReviewOption.setEnabled(false); radioOptionModifyWithVersion.addValueChangeHandler(new ValueChangeHandler(){ public void onValueChange(ValueChangeEvent event) { if(event.getValue()){ curriculumReviewOption.setEnabled(true); } } }); continueButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { if (radioOptionModifyNoVersion.getValue()){ ]]> maxValue || v < minValue) { val.setError(MessageUtils.interpolate( getMessage("validation.outOfRange"), bcb.toMap())); } } else if (maxValue != null) { if (v > maxValue) { val.setError(MessageUtils.interpolate( getMessage("validation.maxValueFailed"), bcb .toMap())); } } else if (minValue != null) { if (v < minValue) { val.setError(MessageUtils.interpolate( getMessage("validation.minValueFailed"), bcb .toMap())); } } } if (!val.isOk()) { results.add(val); } } private void validateDate(Object value, BaseConstraintBean bcb, ]]> maxValue || v < minValue) { val.setError(MessageUtils.interpolate(getMessage("validation.outOfRange"), toMap(constraint))); } } else if (maxValue != null) { if (v > maxValue) { val.setError(MessageUtils.interpolate(getMessage("validation.maxValueFailed"), toMap(constraint))); } } else if (minValue != null) { if (v < minValue) { val.setError(MessageUtils.interpolate(getMessage("validation.minValueFailed"), toMap(constraint))); } } } if (!val.isOk()) { results.add(val); } } protected void validateDate(Object value, Constraint constraint, String element, List results, DateParser dateParser) { ]]> validateTypeStateObject(Object data, ]]> permissions = getFieldAccessPermissions(dtoName,idType,id, docType); if (permissions != null) { for (Map.Entry permission : permissions.entrySet()) { String dtoFieldPath = permission.getKey(); String fieldAccessLevel = permission.getValue(); String[] fieldPathTokens = getPathTokens(dtoFieldPath); Metadata fieldMetadata = metadata.getProperties().get(fieldPathTokens[0]); for(int i = 1; i < fieldPathTokens.length; i++) { if(fieldMetadata == null) { break; } fieldMetadata = fieldMetadata.getProperties().get(fieldPathTokens[i]); } if (fieldMetadata != null) { Permission perm = Permission.kimValueOf(fieldAccessLevel); if (Permission.EDIT.equals(perm)) { setReadOnly(fieldMetadata, false); } else if (Permission.PARTIAL_UNMASK.equals(perm)){ ]]> ()); } cluFee.getCluFeeRecords().add(feeRec); } ]]> getResultOptions() { ]]> >() { @Override public void exec(List result) { SelectedResults value = result.get(0); ViewContext viewContext = new ViewContext(); viewContext.setId(value.getResultRow().getId()); String cluType = value.getResultRow().getValue("lu.resultColumn.luOptionalType"); if (cluType != null) { viewContext.setAttribute(ProgramConstants.TYPE, cluType); } ]]> () { @Override public void onFailure(Throwable throwable) { Window.alert(throwable.getMessage()); GWT.log("Failed to retrieve clu for id: '" + "'", throwable); } @Override public void onSuccess(final VersionDisplayInfo versionInfo) { statementRpcServiceAsync.getClu(versionInfo.getId(), new AsyncCallback() { @Override public void onFailure(Throwable throwable) { Window.alert(throwable.getMessage()); GWT.log("Failed to retrieve clu", throwable); } @Override public void onSuccess(CluInfo cluInfo) { ]]> iter = data.realPropertyIterator(); iter.hasNext();) { Property prop = iter.next(); Object fieldData = prop.getValue(); Object fieldKey = prop.getKey(); Metadata fieldMetadata = metadata.getProperties().get(fieldKey); //if the fieldMetadata is null then try to use the parent metadata as in the case of lists if(fieldMetadata==null){ fieldMetadata=metadata; } //If the fieldData is Data itself the recurse if (fieldData instanceof Data) { if (DataType.LIST.equals(fieldMetadata.getDataType())) { //Lists are a special case where the metadata property name is "*" Metadata listChildMetadata = fieldMetadata.getProperties().get("*"); //see if this is a list of data or a list of fields if(DataType.DATA.equals(listChildMetadata.getDataType())){ ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a document category. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> results) { Map values = model.query(path); if (values.isEmpty() && isRequiredCheck(meta)) { addError(results, path, REQUIRED); } else { Object[] keys = values.keySet().toArray(); for (int keyIndex = 0; keyIndex < keys.length; keyIndex++) { QueryPath element = (QueryPath) keys[keyIndex]; Object o = values.get(element); if (o == null) { if (isRequiredCheck(meta)) { addError(results, element, REQUIRED); } } else { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a document category. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> attributes; @XmlElement private MetaInfo metaInfo; @XmlAttribute private String type; @XmlAttribute private String state; @XmlAttribute private String id; /** * Friendly name of the CLU Set. */ public String getName() { return name; } public void setName(String name) { this.name = name; } /** * Narrative description of the CLU Set. */ public RichTextInfo getDescr() { return descr; } public void setDescr(RichTextInfo descr) { this.descr = descr; } /** * Date and time that this CLU Set became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date. */ public Date getEffectiveDate() { return effectiveDate; } public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } /** * Date and time that this CLU Set expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date. */ public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } // /** // * Specifies a search for CLU identifiers. Present for dynamic CLU Sets // */ // public CluCriteriaInfo getCluCriteria() { // return cluCriteria; // } // // public void setCluCriteria(CluCriteriaInfo cluCriteria) { // this.cluCriteria = cluCriteria; // } /** * List of key/value pairs, typically used for dynamic attributes. */ public Map getAttributes() { ]]> additionalLookupMetadata; public Picker(LookupMetadata inLookupMetadata, List additionalLookupMetadata) { super(inLookupMetadata, additionalLookupMetadata); this.initLookupMetadata = inLookupMetadata; this.additionalLookupMetadata = additionalLookupMetadata; } public String getName() { return name; } public void setName(String name) { this.name = name; } public LookupMetadata getInitLookupMetadata() { return initLookupMetadata; } public void setInitLookupMetadata(LookupMetadata initLookupMetadata) { this.initLookupMetadata = initLookupMetadata; } public List getAdditionalLookupMetadata() { return additionalLookupMetadata; } public void setAdditionalLookupMetadata(List additionalLookupMetadata) { this.additionalLookupMetadata = additionalLookupMetadata; } } ]]> ((Collection) value).size()) { ValidationResultInfo valRes = new ValidationResultInfo( xPath); valRes.setError(MessageUtils.interpolate(getMessage("validation.minOccurs"), bcb.toMap())); results.add(valRes); } Integer maxOccurs = tryParse(bcb.maxOccurs); if (maxOccurs != null && maxOccurs < ((Collection) value).size()) { ValidationResultInfo valRes = new ValidationResultInfo( xPath); valRes.setError(MessageUtils.interpolate(getMessage("validation.maxOccurs"), bcb.toMap())); results.add(valRes); } } else { ]]> callback, final ViewContext viewContext) { Data data = new Data(); Data versionData = new Data(); versionData.set(new Data.StringKey("versionIndId"), getViewContext().getId()); versionData.set(new Data.StringKey("versionComment"), "Major Disicpline Version"); data.set(new Data.StringKey("versionInfo"), versionData); programRemoteService.saveData(data, new AbstractCallback(getLabel(ProgramMsgConstants.COMMON_RETRIEVINGDATA)) { @Override public void onSuccess(DataSaveResult result) { super.onSuccess(result); refreshModelAndView(result); viewContext.setId(ProgramUtils.getProposalId(programModel)); ]]> programRequirementIds, AsyncCallback> callback); public void storeProgramRequirements(Map states, Map progReqs, AsyncCallback> async); public void createProgramRequirement(ProgramRequirementInfo programRequirementInfo, AsyncCallback callback); public void deleteProgramRequirement(String programRequirementId, AsyncCallback callback); public void updateProgramRequirement(ProgramRequirementInfo programRequirementInfo, AsyncCallback callback); public void isLatestVersion(String versionIndId, Long versionSequenceNumber, AsyncCallback callback); public void updateState(Data data, String state, AsyncCallback callback); ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Indicates the state of this person record */ public String getState() { ]]> callback){ //Setup View Context String idType = null; String viewContextId = ""; if(getViewContext().getIdType() != null){ idType = getViewContext().getIdType().toString(); viewContextId = getViewContext().getId(); if(getViewContext().getIdType()==IdAttributes.IdType.COPY_OF_OBJECT_ID){ viewContextId = null; } } HashMap idAttributes = new HashMap(); if(idType != null){ idAttributes.put(IdAttributes.ID_TYPE, idType); } idAttributes.put(StudentIdentityConstants.DOCUMENT_TYPE_NAME, currentDocType); ]]> getProgramRequirements() { if (programRequirements == null) { programRequirements = new ArrayList(0); } return programRequirements; } public void setProgramRequirements(List programRequirements) { this.programRequirements = programRequirements; } /** * List of key/value pairs, typically used for dynamic attributes. */ public Map getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning unit type. Once set at create time, this field may not be updated. */ public String getType() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for the LO to LO relation type. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the * data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Identifier for the clu fee record. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> attributes) { this.attributes = attributes; } /** * Gets the create and last update info for the structure. * This is optional and treated as read only since the data is set by * the internals of the service during maintenance operations. * * @return Meta data information */ public MetaInfo getMetaInfo() { return metaInfo; } /** * Sets the create and last update info for the structure. * This is optional and treated as read only since the data is set by * the internals of the service during maintenance operations. * * @param metaInfo Meta data information */ public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Gets the object to statement relation type. * * @return Object to statement relation type */ public String getType() { return type; } /** * Sets the object to statement relation type. * * @param type Object to statement relation type */ public void setType(String type) { this.type = type; } /** * Gets the identifier for the current status of the object to statement * relationship. The values for this field are constrained to those in * the refStatementRelationState enumeration. A separate setup operation * does not exist for retrieval of the meta data around this value. * * @return Object to statement relation state */ public String getState() { return state; } /** * Sets the identifier for the current status of the object to statement * relationship. The values for this field are constrained to those in * the refStatementRelationState enumeration. A separate setup operation * does not exist for retrieval of the meta data around this value. * * @param state Object to statement relation state */ public void setState(String state) { this.state = state; } /** * Gets the unique identifier for a single Object Statement Relationship record. * * @return Object to Statement Relation Identifier */ public String getId() { return id; } /** * Sets the unique identifier for a single Object Statement Relationship record. * * @param id Object to statement relation identifier */ public void setId(String id) { this.id = id; } @Override public String toString() { return "RefStatementRelationInfo[id=" + id + ", type=" + type ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for the LO to LO relation type. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a scale. */ public String getId() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a person type. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a scale. */ public String getId() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Identifier for a person to person relationship type. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { ]]> getAttributes(){ if(attributes == null){ attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes){ this.attributes = attributes; } public String getId(){ return id; } public void setId(String id){ this.id = id; } } ]]> samlProperties = new HashMap(); samlProperties.put("user", user.trim()); samlProperties.put("proxyGrantingTicket", pgt.trim()); samlProperties.put("proxies", proxies.trim()); samlProperties.put("samlIssuerForUser", samlIssuerForUser.trim()); SamlUtils.setSamlProperties(samlProperties); SAMLAssertion samlAssertion = SamlUtils.createAssertion(); Document signedSAML = SamlUtils.signAssertion(samlAssertion); ]]> ids = event.getProgramRequirementIds(); programModel.set(QueryPath.parse(ProgramConstants.PROGRAM_REQUIREMENTS), new Data()); Data programRequirements = programModel.get(ProgramConstants.PROGRAM_REQUIREMENTS); if (programRequirements == null) { Window.alert("Cannot find program requirements in data model."); GWT.log("Cannot find program requirements in data model", null); return; } for (String id : ids) { programRequirements.add(id); } ]]> any; @XmlAttribute(name = "Context") @XmlSchemaType(name = "anyURI") protected String context; @XmlAnyAttribute private Map otherAttributes = new HashMap(); /** * Gets the value of the any property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the any property. * *

* For example, to add a new item, do as follows: *

     *    getAny().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Object } * {@link Element } * * */ public List getAny() { if (any == null) { any = new ArrayList(); } return this.any; } /** * Gets the value of the context property. * * @return * possible object is * {@link String } * */ public String getContext() { return context; } /** * Sets the value of the context property. * * @param value * allowed object is * {@link String } * */ public void setContext(String value) { this.context = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * *

* the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map getOtherAttributes() { return otherAttributes; } } ]]> attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for the LU to LU relation type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * Identifier for the current status of a CLU to CLU relationship. The values for this field are constrained to those in the luLuRelationState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a CLU to CLU relationship. This is optional, due to the identifier being set at the time of creation. Once the relation has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } @Override public String toString() { return "CluCluRelationInfo[id=" + id + ", cluId=" + cluId + ", relatedCluId=" + relatedCluId + ", type=" + type + ", cluRelationRequired=" + isCluRelationRequired + "]"; ]]> attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for the LU to LU relation type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * Identifier for the current status of a CLU to CLU relationship. The values for this field are constrained to those in the luLuRelationState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a CLU to CLU relationship. This is optional, due to the identifier being set at the time of creation. Once the relation has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } @Override public String toString() { return "CluCluRelationInfo[id=" + id + ", cluId=" + cluId + ", relatedCluId=" + relatedCluId + ", type=" + type + ", cluRelationRequired=" + isCluRelationRequired + "]"; ]]> recursions = new HashMap(); public int increment(String objectName){ Integer hits = recursions.get(objectName); if (hits == null){ hits = new Integer(1); } else { hits++; } recursions.put(objectName, hits); return hits; } public int decrement(String objectName){ Integer hits = recursions.get(objectName); if (hits >= 1){ hits--; } recursions.put(objectName, hits); return hits; } } /** * Create a Metadata service initialized using a given classpath metadata context file * * @param metadataContext the classpath metadata context file */ public MetadataServiceImpl(String metadataContext){ ]]> attributes; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getShortName() { return shortName; } public void setShortName(String shortName) { this.shortName = shortName; } public String getLongName() { return longName; } public void setLongName(String longName) { this.longName = longName; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } public String getDivision() { return division; } public void setDivision(String division) { this.division = division; } public String getVariation() { ]]> repeatingProperty = new HashMap(); repeatingProperty.put("*", repeatingMetadata); metadata.setProperties(repeatingProperty); } else if (nestedProperties != null){ metadata.setProperties(nestedProperties); } properties.put(fd.getName(), metadata); } ]]> results = this.validateEnumeratedValue(enumeratedValue); if(null != results) { for(ValidationResultInfo result:results){ if(result !=null && ValidationResultInfo.ErrorLevel.ERROR.equals(result.getErrorLevel())){ throw new EnumerationException("addEnumeratedValue failed because the EnumeratdValue failed to pass validation against its EnumerationMeta - With Messages: " + result.toString());//FIXME need to get messages here } } } } EnumeratedValue enumeratedValueEntity = new EnumeratedValue(); ]]> luCodes; @Column(name = "NEXT_REVIEW_PRD") private String nextReviewPeriod; @Column(name = "IS_ENRL") private boolean enrollable; @OneToMany(cascade=CascadeType.ALL, mappedBy="clu") private List offeredAtpTypes; @Column(name = "HAS_EARLY_DROP_DEDLN") private boolean hasEarlyDropDeadline; @Column(name = "DEF_ENRL_EST") private int defaultEnrollmentEstimate; @Column(name = "DEF_MAX_ENRL") private int defaultMaximumEnrollment; @Column(name = "IS_HAZR_DISBLD_STU") private boolean hazardousForDisabledStudents; ]]> otherAttributes = new HashMap(); /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * *

* the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map getOtherAttributes() { return otherAttributes; } } ]]> states = new ArrayList(); states.add("Approved"); states.add("Active"); states.add("Draft"); states.add("Superseded"); request.addParam("lu.queryParam.luOptionalState", states); SearchResult result = luService.search(request); String resultString = result.getRows().get(0).getCells().get(0).getValue(); return "0".equals(resultString); } ]]> otherAttributes = new HashMap(); /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * *

* the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map getOtherAttributes() { return otherAttributes; } } ]]> attributes) { this.attributes = attributes; } /** * Gets the create and last update info for the structure. * This is optional and treated as read only since the data is set by * the internals of the service during maintenance operations. * * @return Meta data information */ public MetaInfo getMetaInfo() { return metaInfo; } /** * Sets the create and last update info for the structure. * This is optional and treated as read only since the data is set by * the internals of the service during maintenance operations. * * @param metaInfo Meta data information */ public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Gets the object to statement relation type. * * @return Object to statement relation type */ public String getType() { return type; } /** * Sets the object to statement relation type. * * @param type Object to statement relation type */ public void setType(String type) { this.type = type; } /** * Gets the identifier for the current status of the object to statement * relationship. The values for this field are constrained to those in * the refStatementRelationState enumeration. A separate setup operation * does not exist for retrieval of the meta data around this value. * * @return Object to statement relation state */ public String getState() { return state; } /** * Sets the identifier for the current status of the object to statement * relationship. The values for this field are constrained to those in * the refStatementRelationState enumeration. A separate setup operation * does not exist for retrieval of the meta data around this value. * * @param state Object to statement relation state */ public void setState(String state) { this.state = state; } /** * Gets the unique identifier for a single Object Statement Relationship record. * * @return Object to Statement Relation Identifier */ public String getId() { return id; } /** * Sets the unique identifier for a single Object Statement Relationship record. * * @param id Object to statement relation identifier */ public void setId(String id) { this.id = id; } ]]> > excludedViews = new ArrayList>(); excludedViews.add(ProgramSections.PROGRAM_REQUIREMENTS_EDIT); excludedViews.add(ProgramSections.SUPPORTING_DOCUMENTS_EDIT); excludedViews.add(ProgramSections.SUMMARY); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), saveButton, excludedViews); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), cancelButton, excludedViews); initialized = true; } } private void initHandlers() { ]]> callback) { ViewContext viewContext = getViewContext(); if (viewContext.getIdType() == IdType.COPY_OF_OBJECT_ID) { createNewVersionAndLoadModel(callback, viewContext); } else { super.loadModel(callback); } } protected void createNewVersionAndLoadModel(final ModelRequestCallback callback, final ViewContext viewContext) { Data data = new Data(); Data versionData = new Data(); versionData.set(new Data.StringKey("versionIndId"), getViewContext().getId()); versionData.set(new Data.StringKey("versionComment"), "Credential Program Version"); ]]> > excludedViews = new ArrayList>(); excludedViews.add(ProgramSections.PROGRAM_REQUIREMENTS_EDIT); excludedViews.add(ProgramSections.SUPPORTING_DOCUMENTS_EDIT); excludedViews.add(ProgramSections.SUMMARY); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), saveButton, excludedViews); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), cancelButton, excludedViews); initialized = true; } } private void initHandlers() { ]]> getAttributes() { ]]> attributes; @XmlElement private MetaInfo metaInfo; @XmlAttribute private String type; @XmlAttribute private String state; @XmlAttribute(name="key") private String id; /** * Name of the milestone. */ public String getName() { return name; } public void setName(String name) { this.name = name; } /** * Description of the milestone. */ public RichTextInfo getDesc() { return desc; } public void setDesc(RichTextInfo desc) { this.desc = desc; } /** * Unique identifier for an Academic Time Period (ATP). */ public String getAtpId() { return atpId; } public void setAtpId(String atpId) { this.atpId = atpId; } /** * Date and time of the milestone. */ public Date getMilestoneDate() { ]]> getAttributes() { ]]> max) { addRangeError(results, element, OUT_OF_RANGE, min, max); } } else if (min != null && d < min) { addError(results, element, MIN_VALUE, min); } else if (max != null && d > max) { addError(results, element, MAX_VALUE, max); } } } } } } private void doValidateDate(DataModel model, Metadata meta, ]]> max) { addRangeError(results, element, OUT_OF_RANGE, min, max); } } else if (min != null && i < min) { addError(results, element, MIN_VALUE, min); } else if (max != null && i > max) { addError(results, element, MAX_VALUE, max); } } } } } } private void doValidateDouble(DataModel model, Metadata meta, ]]> > excludedViews = new ArrayList>(); excludedViews.add(ProgramSections.PROGRAM_REQUIREMENTS_EDIT); excludedViews.add(ProgramSections.SUPPORTING_DOCUMENTS_EDIT); excludedViews.add(ProgramSections.SUMMARY); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), saveButton, excludedViews); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), cancelButton, excludedViews); initialized = true; } } ]]> > originalAdvancedSearchCallback = couWidget.getPicker().getAdvancedSearchCallback(); couWidget.getPicker().setAdvancedSearchCallback(new Callback>() { public void exec(List results) { //Chain the original call and add the new item(s) to the rest of the selects originalAdvancedSearchCallback.exec(results); if (unitCheckBox.getValue() && results.size() > 0) { for (SelectedResults res : results) { for(KSSelectedList select:unitSelects){ select.addItem(res.getReturnKey(), res.getDisplayKey()); } } } } }); } ]]> > excludedViews = new ArrayList>(); excludedViews.add(ProgramSections.PROGRAM_REQUIREMENTS_EDIT); excludedViews.add(ProgramSections.SUPPORTING_DOCUMENTS_EDIT); excludedViews.add(ProgramSections.SUMMARY); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), saveButton, excludedViews); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), cancelButton, excludedViews); initialized = true; } } ]]> > originalAdvancedSearchCallback = couWidget.getPicker().getAdvancedSearchCallback(); couWidget.getPicker().setAdvancedSearchCallback(new Callback>() { public void exec(List results) { //Chain the original call and add the new item(s) to the rest of the selects originalAdvancedSearchCallback.exec(results); if (unitCheckBox.getValue() && results.size() > 0) { for (SelectedResults res : results) { for(KSSelectedList select:unitSelects){ select.addItem(res.getReturnKey(), res.getDisplayKey()); } } } } }); } ]]> > excludedViews = new ArrayList>(); excludedViews.add(ProgramSections.PROGRAM_REQUIREMENTS_EDIT); excludedViews.add(ProgramSections.SUPPORTING_DOCUMENTS_EDIT); excludedViews.add(ProgramSections.SUMMARY); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), saveButton, excludedViews); addCommonButton(getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS), cancelButton, excludedViews); initialized = true; } } ]]> attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for the LU to LU relation type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * Identifier for the current status of a CLU to CLU relationship. The values for this field are constrained to those in the luLuRelationState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. */ public String getState() { return state; } public void setState(String state) { this.state = state; } /** * Unique identifier for a CLU to CLU relationship. This is optional, due to the identifier being set at the time of creation. Once the relation has been created, this should be seen as required. */ public String getId() { return id; } public void setId(String id) { this.id = id; } ]]> (){ @Override public void exec(Boolean result) { if(result){ filterCategoryByType(); } } }); } } }); ]]> versions = programService.getVersions(ProgramServiceConstants.PROGRAM_NAMESPACE_MAJOR_DISCIPLINE_URI, selectedVersion.getVersionInfo().getVersionIndId()); Long startSeq = new Long(1); if (!isSelectedVersionCurrent) { startSeq = currentVersion.getVersionInfo().getSequenceNumber() + 1; } for (VersionDisplayInfo versionInfo : versions) { boolean isVersionNewerThanCurrentVersion = versionInfo.getSequenceNumber() >= startSeq; boolean isVersionSelectedVersion = versionInfo.getSequenceNumber().equals(selectedVersion.getVersionInfo().getSequenceNumber()); boolean updateState = isVersionNewerThanCurrentVersion && !isVersionSelectedVersion; if (updateState) { ]]> >() { @Override public void exec(List result) { boolean isSectionValid = isValid(result, true); if (isSectionValid) { saveData(okCallback); } else { okCallback.exec(false); KSNotifier.add(new KSNotification("Unable to save, please check fields for errors.", false, true, 5000)); } } }); } @Override public void onRequestFail(Throwable cause) { GWT.log("Unable to retrieve model for validation and save", cause); } }); } private void doCancel() { ]]> callback) { } @Override public void setValue(Data.Value value) { } @Override public void getValue(Callback doneSaveCallback) { } @Override public void setValue(final String id) { if (id != null) { getCluNameCallback.exec(id); } } public void setLabelContent(String id, final String code) { layout.clear(); ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { ]]> MAX_RECENT_HISTORY){ recentlyViewedDocs.remove(MAX_RECENT_HISTORY); } for(int i =0; i < dependants.size(); i++){ dependants.get(i).update(); } } public static List getRecentlyViewed(){ ]]> buttonGroup = new YesNoCancelGroup(); final ButtonMessageDialog dialog = new ButtonMessageDialog("Warning", "You may have unsaved changes. Save changes?", buttonGroup); buttonGroup.addCallback(new Callback() { @Override public void exec(ButtonEnumerations.YesNoCancelEnum result) { switch (result) { case YES: dialog.hide(); preview.storeRules(true, new Callback() { ]]> onReadyCallback) { Map idAttributes = new HashMap(); ViewContext viewContext = getViewContext(); IdType idType = viewContext.getIdType(); String viewContextId = null; if (idType != null) { idAttributes.put(IdAttributes.ID_TYPE, idType.toString()); viewContextId = viewContext.getId(); if (idType == IdType.COPY_OF_OBJECT_ID) { viewContextId = null; } } ]]> >() { @Override public void exec(List result) { boolean isSectionValid = isValid(result, true); if (isSectionValid) { saveData(okCallback); } else { okCallback.exec(false); KSNotifier.add(new KSNotification("Unable to save, please check fields for errors.", false, true, 5000)); } } }); } @Override public void onRequestFail(Throwable cause) { GWT.log("Unable to retrieve model for validation and save", cause); } }); } private void doCancel() { ]]> 0){ for (Map.Entry entry : currentRelations.entrySet()) { // Create a new relation with the id of the relation we want to // delete CluCluRelationInfo relationToDelete = new CluCluRelationInfo(); relationToDelete.setId( entry.getValue() ); BaseDTOAssemblyNode relationToDeleteNode = new BaseDTOAssemblyNode( null); relationToDeleteNode.setNodeData(relationToDelete); relationToDeleteNode.setOperation(NodeOperation.DELETE); results.add(relationToDeleteNode); } } return results; } public List> addAllRelationNodes(String cluId, String relatedCluId, String relationType, NodeOperation operation, Map currentRelations)throws AssemblyException{ ]]> errorMessages, List tokenList, int currentIndex) { Token prevToken = (tokenList == null || currentIndex - 1 < 0)? null : tokenList.get(currentIndex - 1); Token nextToken = (tokenList == null || currentIndex + 1 >= tokenList.size())? null : tokenList.get(currentIndex + 1); boolean validToken = true; if (prevToken != null && (prevToken.type == Token.Condition || prevToken.type == Token.EndParenthesis) == false) { errorMessages.add("only condition and ) could sit before )"); ]]> attributes){ ]]> () { @Override public void exec(Boolean result) { if (result) { reqDataModelComp.retrieveProgramRequirements(MajorEditController.this, comparisonModelId, new Callback() { @Override public void exec(Boolean result) { if (result) { callback.onModelReady(comparisonModel); } } }); } } }); } ]]> toMap(Constraint c) { Map result = new HashMap(); result.put("minOccurs", c.getMinOccurs()); result.put("maxOccurs", c.getMaxOccurs()); result.put("minLength", c.getMinLength()); result.put("maxLength", c.getMaxLength()); result.put("minValue", c.getExclusiveMin()); result.put("maxValue", c.getInclusiveMax()); // result.put("dataType", c.getDataType()); return result; } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } @Override public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } public VersionInfo getVersionInfo() { return versionInfo; } public void setVersionInfo(VersionInfo versionInfo) { this.versionInfo = versionInfo; } ]]> proposalReference) { this.proposalReference = proposalReference; } public String getRationale() { return rationale; } public void setRationale(String rationale) { this.rationale = rationale; } public String getDetailDesc() { return detailDesc; } public void setDetailDesc(String detailDesc) { this.detailDesc = detailDesc; } public Date getEffectiveDate() { return effectiveDate; } public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } public ProposalType getType() { ]]> content; @XmlAttribute(name = "Algorithm", required = true) @XmlSchemaType(name = "anyURI") protected String algorithm; /** * Gets the value of the content property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the content property. * *

* For example, to add a new item, do as follows: *

     *    getContent().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Object } * {@link Element } * {@link String } * {@link JAXBElement }{@code <}{@link String }{@code >} * * */ public List getContent() { if (content == null) { content = new ArrayList(); } return this.content; } /** * Gets the value of the algorithm property. * * @return * possible object is * {@link String } * */ public String getAlgorithm() { return algorithm; } /** * Sets the value of the algorithm property. * * @param value * allowed object is * {@link String } * */ public void setAlgorithm(String value) { this.algorithm = value; } } ]]> attributes; @XmlElement private MetaInfo metaInfo; @XmlAttribute private String id; /** * A code that identifies the type of the fee. For example: Lab Fee or Tuition Fee or CMF for Course Materials Fee. */ public String getFeeType() { return feeType; } public void setFeeType(String feeType) { this.feeType = feeType; } /** * Indicates the structure and interpretation of the fee amounts, i.e. Fixed, Variable, Multiple. */ public String getRateType() { return rateType; } public void setRateType(String rateType) { this.rateType = rateType; } /** * The amount or amounts associated with the fee. The number fee amounts and interpretation depends on the rate type. */ public List getFeeAmounts() { if(feeAmounts==null){ feeAmounts = new ArrayList(); ]]> selected = SwitchSection.this.selectableWidget.getSelectedItems(); for(int i = 0; i < selected.size(); i++){ String key = selected.get(i); showSwappableSection(key); } Iterator it = swapSectionMap.keySet().iterator(); while(it.hasNext()){ String key = it.next(); if(!selected.contains(key)){ removeSwappableSection(key); } } } private void showSwappableSection(String key){ ]]> validate(Object dto) throws Exception { return programService.validateMajorDiscipline("OBJECT", (MajorDisciplineInfo)dto); } @Override protected Class getDtoClass() { return MajorDisciplineInfo.class; } ]]> programRequirementIds) { this.programId = programId; this.programType = programType; this.programRequirementIds = programRequirementIds; } @Override public Type getAssociatedType() { return TYPE; } @Override protected void dispatch(Handler handler) { handler.onEvent(this); } public String getProgramId() { return programId; } public String getProgramType() { return programType; } public List getProgramRequirementIds() { return programRequirementIds; } public static interface Handler extends EventHandler { void onEvent(StoreSpecRequirementIDsEvent event); ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a credential type. */ public String getType() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a credential type. */ public String getType() { ]]> callback) { callbacks.add(callback); } public List> getCallbacks() { return callbacks; } protected void sendCallbacks(T type){ for(Callback c: getCallbacks()){ c.exec(type); } } public void setButtonText(T key, String text){ buttonMap.get(key).setText(text); } public KSButton getButton(T key){ return buttonMap.get(key); } ]]> selected = SwitchSection.this.selectableWidget.getSelectedItems(); for(int i = 0; i < selected.size(); i++){ String key = selected.get(i); showSwappableSection(key); } Iterator it = swapSectionMap.keySet().iterator(); while(it.hasNext()){ String key = it.next(); if(!selected.contains(key)){ removeSwappableSection(key); } } } /** * This is handled differently than handleUserSelection because it is assumed that the client * is setting the correct values into the widgets, therefore no need to delete sections * (also reduces chance of actually deleting data before it is even shown) */ private void handleSelection(){ List selected = SwitchSection.this.selectableWidget.getSelectedItems(); ]]> selected = SwapSection.this.selectableWidget.getSelectedItems(); for(int i = 0; i < selected.size(); i++){ String key = selected.get(i); showSwappableSection(key); } Iterator it = swapSectionMap.keySet().iterator(); while(it.hasNext()){ String key = it.next(); if(!selected.contains(key)){ removeSwappableSection(key); } } } private void showSwappableSection(String key){ ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a credential type. */ public String getType() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * The page luDocumentTypeKey Structure does not exist. */ public String getId() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the * data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Identifier for the clu fee record. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the * data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Identifier for the clu fee record. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a learning objective category type. */ public String getId() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for a learning objective repository. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a credential type. */ public String getType() { return type; } public void setType(String type) { this.type = type; } /** * Unique identifier for a credential value. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttrKeys() { return null; //apparently unused } @Override public String getItemAttribute(String id, String attrkey) { return null; //apparently unused } @Override public int getItemCount() { return map.size(); } @Override public List getItemIds() { return new ArrayList(map.keySet()); } @Override public String getItemText(String id) { return map.get(id); } }; ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Identifier for a person to person relationship type. */ public String getId() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Identifier for the clu fee record. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Identifier for a person to person relationship type. */ public String getId() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for the citizenship record. This is set by the service to be able to determine changes and alterations to the structure as well as provides a handle for searches. This structure is not accessible through unique operations, and it is strongly recommended that no external references to this particular identifier be maintained. Once this identifier is set by the service, it should be seen as required and readonly. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Identifier for a person to person relationship type. */ public String getId() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { return metaInfo; } public void setMetaInfo(MetaInfo metaInfo) { this.metaInfo = metaInfo; } /** * Unique identifier for the organization position restriction record. This is set by the service to be able to determine changes and alterations to the structure as well as provides a handle for searches. Once set by the service, this should be seen as read-only and immutable. This structure is not retrievable by this identifier to limit the number of active organization position restriction records visible through the service. It is strongly recommended that this identifier not be referenced by outside consumers. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Unique identifier for a comment type. */ public String getId() { ]]> getAttributes() { if (attributes == null) { attributes = new HashMap(); } return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } /** * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. */ public MetaInfo getMetaInfo() { ]]>