cluFeeRecords, LuDao dao) throws InvalidParameterException { if (cluFeeRecords == null) { return; } if (!isUpdate) { for (CluFeeRecordInfo feeRecordInfo : cluFeeRecords) { CluFeeRecord feeRec = new CluFeeRecord(); feeRec.setAffiliatedOrgs(toAffiliatedOrgs(isUpdate, feeRec.getAffiliatedOrgs(), feeRecordInfo.getAffiliatedOrgs(), dao)); feeRec.setFeeType(feeRecordInfo.getFeeType()); feeRec.setRateType(feeRecordInfo.getRateType()); feeRec.setDescr(toRichText(LuRichText.class, feeRecordInfo.getDescr())); feeRec.setFeeAmounts(toFeeAmounts(isUpdate, feeRec.getFeeAmounts(), feeRecordInfo.getFeeAmounts(), dao)); feeRec.setAttributes(LuServiceAssembler.toGenericAttributes( CluFeeRecordAttribute.class, feeRecordInfo .getAttributes(), feeRec, dao)); if(cluFee.getCluFeeRecords()==null){ cluFee.setCluFeeRecords(new ArrayList()); } cluFee.getCluFeeRecords().add(feeRec); } } else { Map oldFeeRecMap = new HashMap(); if(cluFee.getCluFeeRecords()!=null){ for (CluFeeRecord feeRec : cluFee.getCluFeeRecords()) { oldFeeRecMap.put(feeRec.getId(), feeRec); } cluFee.getCluFeeRecords().clear(); } // Loop through the new list, if the item exists already update and // remove from the list // otherwise create a new entry for (CluFeeRecordInfo feeRecordInfo : cluFeeRecords) { CluFeeRecord feeRec = oldFeeRecMap.remove(feeRecordInfo.getId()); if (feeRec == null) { feeRec = new CluFeeRecord(); } feeRec.setAffiliatedOrgs(toAffiliatedOrgs(isUpdate, feeRec.getAffiliatedOrgs(), feeRecordInfo.getAffiliatedOrgs(),dao)); feeRec.setFeeType(feeRecordInfo.getFeeType()); feeRec.setRateType(feeRecordInfo.getRateType()); feeRec.setDescr(toRichText(LuRichText.class, feeRecordInfo.getDescr())); feeRec.setFeeAmounts(toFeeAmounts(isUpdate, feeRec.getFeeAmounts(), feeRecordInfo.getFeeAmounts(),dao)); feeRec.setAttributes(LuServiceAssembler.toGenericAttributes( CluFeeRecordAttribute.class, feeRecordInfo .getAttributes(), feeRec, dao)); if(cluFee.getCluFeeRecords()==null){ cluFee.setCluFeeRecords(new ArrayList()); } cluFee.getCluFeeRecords().add(feeRec); } // Now delete anything left over for (Entry entry : oldFeeRecMap.entrySet()) { dao.delete(entry.getValue()); } } } public static List toAffiliatedOrgs(boolean isUpdate, List orgList, List affiliatedOrgInfoList, LuDao dao) { if(null == affiliatedOrgInfoList) { return orgList; } if(orgList==null){ orgList = new ArrayList(); } if (!isUpdate) { for (AffiliatedOrgInfo orgInfo : affiliatedOrgInfoList) { AffiliatedOrg org = new AffiliatedOrg(); BeanUtils.copyProperties(orgInfo, org); orgList.add(org); } } else { Map oldOrgMap = new HashMap(); for (AffiliatedOrg org : orgList) { oldOrgMap.put(org.getId(), org); } orgList.clear(); for (AffiliatedOrgInfo orgInfo : affiliatedOrgInfoList) { AffiliatedOrg org = oldOrgMap.remove(orgInfo.getId()); if (org == null) { org = new AffiliatedOrg(); } BeanUtils.copyProperties(orgInfo, org); orgList.add(org); } // Now delete anything left over for (Entry entry : oldOrgMap.entrySet()) { dao.delete(entry.getValue()); } } return orgList; } public static List toFeeAmounts(boolean isUpdate, List caList, List caInfoList, LuDao dao){ if(null == caInfoList) { return caList; } if(caList==null){ caList = new ArrayList(caInfoList.size()); } if (!isUpdate) { for (CurrencyAmountInfo caInfo:caInfoList){ CurrencyAmount ca = new CurrencyAmount(); ca.setCurrencyQuantity(caInfo.getCurrencyQuantity()); ca.setCurrencyTypeKey(caInfo.getCurrencyTypeKey()); CluFeeAmount cluFeeAmount = new CluFeeAmount(); cluFeeAmount.setCurrencyAmount(ca); caList.add(cluFeeAmount); } } else { // Delete existing fee amounts (this assumes feeAmounts are not individually updated) for (CluFeeAmount cluFeeAmount:caList) { dao.delete(cluFeeAmount); } caList.clear(); for (CurrencyAmountInfo caInfo : caInfoList) { CurrencyAmount ca = new CurrencyAmount(); ca.setCurrencyQuantity(caInfo.getCurrencyQuantity()); ca.setCurrencyTypeKey(caInfo.getCurrencyTypeKey()); CluFeeAmount cluFeeAmount = new CluFeeAmount(); cluFeeAmount.setCurrencyAmount(ca); caList.add(cluFeeAmount); } } return caList; } public static CluIdentifier createOfficialIdentifier(CluInfo cluInfo, LuDao dao) throws InvalidParameterException { CluIdentifier officialIdentifier = new CluIdentifier(); BeanUtils.copyProperties(cluInfo.getOfficialIdentifier(), officialIdentifier, new String[] { "attributes"}); officialIdentifier.setAttributes(LuServiceAssembler.toGenericAttributes( CluIdentifierAttribute.class, cluInfo.getOfficialIdentifier() .getAttributes(), officialIdentifier, dao)); return officialIdentifier; } public static void updateOfficialIdentifier(Clu clu, CluInfo cluInfo, LuDao dao) throws InvalidParameterException { if (clu.getOfficialIdentifier() == null) { clu.setOfficialIdentifier(new CluIdentifier()); } BeanUtils.copyProperties(cluInfo.getOfficialIdentifier(), clu .getOfficialIdentifier(), new String[] { "id" , "attributes"}); clu.getOfficialIdentifier().setAttributes(LuServiceAssembler.toGenericAttributes( CluIdentifierAttribute.class, cluInfo.getOfficialIdentifier() .getAttributes(), clu.getOfficialIdentifier(), dao)); } public static List createAlternateIdentifiers(CluInfo cluInfo, LuDao dao) throws InvalidParameterException { List alternateIdentifiers = new ArrayList(0); for (CluIdentifierInfo cluIdInfo : cluInfo.getAlternateIdentifiers()) { CluIdentifier identifier = new CluIdentifier(); BeanUtils.copyProperties(cluIdInfo, identifier, new String[] { "attributes"} ); identifier.setAttributes(LuServiceAssembler.toGenericAttributes( CluIdentifierAttribute.class, cluIdInfo.getAttributes(), identifier, dao)); alternateIdentifiers.add(identifier); } return alternateIdentifiers; } public static void updateAlternateIdentifier(Map oldAltIdMap, Clu clu, CluInfo cluInfo, LuDao dao) throws InvalidParameterException { for (CluIdentifier altIdentifier : clu.getAlternateIdentifiers()) { oldAltIdMap.put(altIdentifier.getId(), altIdentifier); } clu.getAlternateIdentifiers().clear(); // Loop through the new list, if the item exists already update and // remove from the list // otherwise create a new entry for (CluIdentifierInfo cluIdInfo : cluInfo.getAlternateIdentifiers()) { CluIdentifier identifier = oldAltIdMap.remove(cluIdInfo.getId()); if (identifier == null) { identifier = new CluIdentifier(); } // Do Copy BeanUtils.copyProperties(cluIdInfo, identifier, new String[] { "attributes"}); identifier.setAttributes(LuServiceAssembler.toGenericAttributes( CluIdentifierAttribute.class, cluIdInfo.getAttributes(), identifier, dao)); clu.getAlternateIdentifiers().add(identifier); } } public static List toCluPublicationVariants( List variantInfos, CluPublication cluPub, LuDao luDao) { List variants = new ArrayList(); if(cluPub.getVariants()==null){ cluPub.setVariants(new ArrayList()); } // Delete all the old attributes(if the owner is not null) for (CluPublicationVariant variant : cluPub.getVariants()) { luDao.delete(variant); } cluPub.getVariants().clear(); for (FieldInfo variantInfo: variantInfos) { CluPublicationVariant variant = new CluPublicationVariant(); variant.setKey(variantInfo.getId()); variant.setValue(variantInfo.getValue()); variant.setOwner(cluPub); variants.add(variant); } return variants; } public static CluPublicationInfo toCluPublicationInfo(CluPublication cluPub) { if(cluPub==null){ return null; } CluPublicationInfo cluPubInfo = new CluPublicationInfo(); cluPubInfo.setCluId(cluPub.getClu().getId()); cluPubInfo.setId(cluPub.getId()); cluPubInfo.setEndCycle(cluPub.getEndCycle()); cluPubInfo.setStartCycle(cluPub.getStartCycle()); cluPubInfo.setEffectiveDate(cluPub.getEffectiveDate()); cluPubInfo.setExpirationDate(cluPub.getExpirationDate()); cluPubInfo.setState(cluPub.getState()); ]]> entry : oldLuCodeMap.entrySet()) { luDao.delete(entry.getValue()); } // Update the list of AtpTypeKeys // Get a map of Id->object of all the currently persisted objects in the // list Map oldOfferedAtpTypesMap = new HashMap(); for (CluAtpTypeKey cluAtpTypeKey : clu.getOfferedAtpTypes()) { oldOfferedAtpTypesMap.put(cluAtpTypeKey.getAtpTypeKey(), cluAtpTypeKey); } clu.getOfferedAtpTypes().clear(); // Loop through the new list, if the item exists already update and // remove from the list // otherwise create a new entry for (String atpTypeKey : cluInfo.getOfferedAtpTypes()) { CluAtpTypeKey cluAtpTypeKey = oldOfferedAtpTypesMap .remove(atpTypeKey); if (cluAtpTypeKey == null) { cluAtpTypeKey = new CluAtpTypeKey(); } // Do Copy cluAtpTypeKey.setAtpTypeKey(atpTypeKey); cluAtpTypeKey.setClu(clu); clu.getOfferedAtpTypes().add(cluAtpTypeKey); } // Now delete anything left over for (Entry entry : oldOfferedAtpTypesMap .entrySet()) { luDao.delete(entry.getValue()); } if (cluInfo.getFeeInfo() != null) { if (clu.getFee() == null) { clu.setFee(LuServiceAssembler.toCluFee(clu, false, cluInfo .getFeeInfo(), luDao)); } else { clu.setFee(LuServiceAssembler.toCluFee(clu, true, cluInfo .getFeeInfo(), luDao)); } } else if (clu.getFee() != null) { luDao.delete(clu.getFee()); clu.setFee(null); } if (cluInfo.getAccountingInfo() != null) { if (clu.getAccounting() == null) { clu.setAccounting(new CluAccounting()); } clu.getAccounting().setAttributes( LuServiceAssembler.toGenericAttributes( CluAccountingAttribute.class, cluInfo .getAccountingInfo().getAttributes(), clu .getAccounting(), luDao)); clu.getAccounting().setAffiliatedOrgs(LuServiceAssembler .toAffiliatedOrgs(true, clu.getAccounting().getAffiliatedOrgs(), cluInfo.getAccountingInfo().getAffiliatedOrgs(), luDao)); } else if (clu.getAccounting() != null) { clu.setAccounting(null); } clu.setAttributes(LuServiceAssembler.toGenericAttributes( CluAttribute.class, cluInfo.getAttributes(), clu, luDao)); if (cluInfo.getIntensity() != null) { if (clu.getIntensity() == null) { clu.setIntensity(new Amount()); } BeanUtils .copyProperties(cluInfo.getIntensity(), clu.getIntensity()); } else if (clu.getIntensity() != null) { luDao.delete(clu.getIntensity()); } // Update the list of campusLocations // Get a map of Id->object of all the currently persisted objects in the // list Map oldLocationsMap = new HashMap(); for (CluCampusLocation campus : clu.getCampusLocations()) { oldLocationsMap.put(campus.getCampusLocation(), campus); } clu.getCampusLocations().clear(); // Loop through the new list, if the item exists already update and // remove from the list // otherwise create a new entry for (String locationName : cluInfo.getCampusLocations()) { CluCampusLocation location = oldLocationsMap.remove(locationName); if (location == null) { location = new CluCampusLocation(); } // Do Copy location.setCampusLocation(locationName); location.setClu(clu); clu.getCampusLocations().add(location); } // Now delete anything left over for (Entry entry : oldLocationsMap .entrySet()) { luDao.delete(entry.getValue()); } // Update the List of accreditations // Get a map of Id->object of all the currently persisted objects in the // list Map oldAccreditationMap = new HashMap(); for (CluAccreditation cluAccreditation : clu.getAccreditations()) { oldAccreditationMap.put(cluAccreditation.getId(), cluAccreditation); } clu.getAccreditations().clear(); // Loop through the new list, if the item exists already update and // remove from the list // otherwise create a new entry for (AccreditationInfo accreditationInfo : cluInfo.getAccreditations()) { CluAccreditation cluAccreditation = null; if(accreditationInfo.getId()!=null){ cluAccreditation = oldAccreditationMap.remove(accreditationInfo.getId()); } if (cluAccreditation == null) { cluAccreditation = new CluAccreditation(); } // Do Copy BeanUtils.copyProperties(accreditationInfo, cluAccreditation, new String[] { "attributes" }); cluAccreditation.setAttributes(LuServiceAssembler .toGenericAttributes(CluAccreditationAttribute.class, accreditationInfo.getAttributes(), cluAccreditation, luDao)); clu.getAccreditations().add(cluAccreditation); } // Now delete anything left over for (Entry entry : oldAccreditationMap .entrySet()) { luDao.delete(entry.getValue()); } // Update the List of alternate admin orgs // Get a map of Id->object of all the currently persisted objects in the // list Map oldAdminOrgsMap = new HashMap(); if(clu.getAdminOrgs()!=null){ for (CluAdminOrg cluOrg : clu.getAdminOrgs()) { oldAdminOrgsMap.put(cluOrg.getId(), cluOrg); } } clu.setAdminOrgs(new ArrayList()); // Loop through the new list, if the item exists already update and // remove from the list // otherwise create a new entry for (AdminOrgInfo orgInfo : cluInfo.getAdminOrgs()) { CluAdminOrg cluOrg = null; if(orgInfo.getId() != null){ cluOrg = oldAdminOrgsMap.remove(orgInfo.getId()); } if (cluOrg == null) { cluOrg = new CluAdminOrg(); } // Do Copy BeanUtils.copyProperties(orgInfo, cluOrg, new String[] { "attributes","id" }); cluOrg.setAttributes(LuServiceAssembler.toGenericAttributes( CluAdminOrgAttribute.class, orgInfo.getAttributes(), cluOrg, luDao)); cluOrg.setClu(clu); clu.getAdminOrgs().add(cluOrg); } for (Entry entry : oldAdminOrgsMap.entrySet()) { luDao.delete(entry.getValue()); } // Now copy all not standard properties BeanUtils.copyProperties(cluInfo, clu, new String[] { "luType", "officialIdentifier", "alternateIdentifiers", "descr", "luCodes", "primaryInstructor", "instructors", "stdDuration", "offeredAtpTypes", "feeInfo", "accountingInfo", "attributes", ]]> toFeeAmounts(List cluFees) { List feeAmounts = new ArrayList(); if (cluFees != null){ for (CluFeeAmount cluFeeAmount:cluFees){ CurrencyAmountInfo dto = new CurrencyAmountInfo(); CurrencyAmount ca = cluFeeAmount.getCurrencyAmount(); if(ca!=null){ dto.setCurrencyQuantity(ca.getCurrencyQuantity()); dto.setCurrencyTypeKey(ca.getCurrencyTypeKey()); } feeAmounts.add(dto); } } return feeAmounts; } private static List toAffiliatedOrgInfos( List entities) { List dtos = new ArrayList(); if (entities != null) { for (AffiliatedOrg record : entities) { dtos.add(toAffiliatedOrgInfo(record)); } } return dtos; } private static AffiliatedOrgInfo toAffiliatedOrgInfo(AffiliatedOrg entity) { if (entity == null) { return null; } AffiliatedOrgInfo dto = new AffiliatedOrgInfo(); BeanUtils.copyProperties(entity, dto); return dto; } public static CluAccountingInfo toCluAccountingInfo(CluAccounting entity) { if (entity == null) { return null; } CluAccountingInfo dto = new CluAccountingInfo(); dto.setId(entity.getId()); dto.setAffiliatedOrgs(toAffiliatedOrgInfos(entity.getAffiliatedOrgs())); dto.setAttributes(toAttributeMap(entity.getAttributes())); return dto; } public static Amount toAmount(AmountInfo amountInfo) { if (amountInfo == null) { return null; } Amount amount = new Amount(); BeanUtils.copyProperties(amountInfo, amount); return amount; } public static TimeAmount toTimeAmount(TimeAmountInfo timeAmountInfo) { if (timeAmountInfo == null) { return null; } TimeAmount timeAmount = new TimeAmount(); BeanUtils.copyProperties(timeAmountInfo, timeAmount); return timeAmount; } public static CluCredit toCluCredit(CluCreditInfo cluCreditInfo) { if (cluCreditInfo == null) { return null; } CluCredit cluCredit = new CluCredit(); cluCredit.setMaxAllowableInactivity(LuServiceAssembler .toTimeAmount(cluCreditInfo.getMaxAllowableInactivity())); cluCredit.setMaxTimeResultsRecognized(LuServiceAssembler .toTimeAmount(cluCreditInfo.getMaxTimeResultsRecognized())); cluCredit.setMaxTimeToComplete(LuServiceAssembler .toTimeAmount(cluCreditInfo.getMaxTimeToComplete())); cluCredit.setMinTimeToComplete(LuServiceAssembler .toTimeAmount(cluCreditInfo.getMinTimeToComplete())); cluCredit.setRepeatTime(LuServiceAssembler.toTimeAmount(cluCreditInfo .getRepeatTime())); BeanUtils.copyProperties(cluCreditInfo, cluCredit, new String[] { "repeatTime", "minTimeToComplete", "maxTimeToComplete", "maxAllowableInactivity", "maxTimeResultsRecognized" }); return cluCredit; } public static void copyCluCredit(CluCreditInfo cluCreditInfo, CluCredit entity) { if (entity == null) { return; } if (entity.getMaxAllowableInactivity() == null) { entity.setMaxAllowableInactivity(new TimeAmount()); } BeanUtils.copyProperties(cluCreditInfo.getMaxAllowableInactivity(), entity.getMaxAllowableInactivity()); if (entity.getMaxTimeResultsRecognized() == null) { entity.setMaxTimeResultsRecognized(new TimeAmount()); } BeanUtils.copyProperties(cluCreditInfo.getMaxTimeResultsRecognized(), entity.getMaxTimeResultsRecognized()); if (entity.getMaxTimeToComplete() == null) { entity.setMaxTimeToComplete(new TimeAmount()); } BeanUtils.copyProperties(cluCreditInfo.getMaxTimeToComplete(), entity .getMaxTimeToComplete()); if (entity.getMinTimeToComplete() == null) { entity.setMinTimeToComplete(new TimeAmount()); } BeanUtils.copyProperties(cluCreditInfo.getMinTimeToComplete(), entity .getMinTimeToComplete()); if (entity.getRepeatTime() == null) { entity.setRepeatTime(new TimeAmount()); } BeanUtils.copyProperties(cluCreditInfo.getRepeatTime(), entity .getRepeatTime()); BeanUtils.copyProperties(cluCreditInfo, entity, new String[] { "repeatTime", "minTimeToComplete", "maxTimeToComplete", "maxAllowableInactivity", "maxTimeResultsRecognized" }); } public static List toAccreditationInfos( List entities) { List dtos = new ArrayList(entities.size()); if (entities != null) { for (CluAccreditation entity : entities) { dtos.add(toAccreditationInfo(entity)); } } return dtos; } public static AccreditationInfo toAccreditationInfo(CluAccreditation entity) { if (entity == null) { return null; } AccreditationInfo dto = new AccreditationInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "attributes" }); dto.setAttributes(toAttributeMap(entity.getAttributes())); return dto; } public static List toCluAdminOrgInfos( List entities) { List dtos = new ArrayList(entities.size()); if (entities != null) { for (CluAdminOrg entity : entities) { dtos.add(toAdminOrgInfo(entity)); } } return dtos; } public static AdminOrgInfo toAdminOrgInfo(CluAdminOrg entity) { if (entity == null) { return null; } AdminOrgInfo dto = new AdminOrgInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "attributes" }); dto.setAttributes(toAttributeMap(entity.getAttributes())); return dto; } public static List toLuPublicationTypeInfos( ]]> object of all the currently persisted objects in the // list Map oldAltIdMap = new HashMap(); LuServiceAssembler.updateAlternateIdentifier(oldAltIdMap, clu, cluInfo, luDao); // Now delete anything left over for (Entry entry : oldAltIdMap.entrySet()) { luDao.delete(entry.getValue()); } if (cluInfo.getDescr() != null && (cluInfo.getDescr().getPlain() != null || cluInfo.getDescr().getFormatted() != null)) { if (clu.getDescr() == null) { clu.setDescr(new LuRichText()); } BeanUtils.copyProperties(cluInfo.getDescr(), clu.getDescr()); } else if (clu.getDescr() != null) { luDao.delete(clu.getDescr()); clu.setDescr(null);//TODO is the is the best method of doing this? what if the user passes in a new made up id, does that mean we have orphaned richtexts? } if (cluInfo.getPrimaryInstructor() != null) { if (clu.getPrimaryInstructor() == null) { clu.setPrimaryInstructor(new CluInstructor()); } BeanUtils.copyProperties(cluInfo.getPrimaryInstructor(), clu .getPrimaryInstructor(), new String[] { "attributes" }); clu.getPrimaryInstructor().setAttributes( LuServiceAssembler.toGenericAttributes( CluInstructorAttribute.class, cluInfo .getPrimaryInstructor().getAttributes(), clu.getPrimaryInstructor(), luDao)); } else if (clu.getPrimaryInstructor() != null) { luDao.delete(clu.getPrimaryInstructor()); } // Update the List of instructors // Get a map of Id->object of all the currently persisted objects in the // list Map oldInstructorMap = new HashMap(); for (CluInstructor cluInstructor : clu.getInstructors()) { oldInstructorMap.put(cluInstructor.getOrgId() + "_" + cluInstructor.getPersonId(), cluInstructor); } clu.getInstructors().clear(); // Loop through the new list, if the item exists already update and // remove from the list // otherwise create a new entry for (CluInstructorInfo instructorInfo : cluInfo.getInstructors()) { CluInstructor cluInstructor = oldInstructorMap .remove(instructorInfo.getOrgId() + "_" + instructorInfo.getPersonId()); if (cluInstructor == null) { cluInstructor = new CluInstructor(); } // Do Copy BeanUtils.copyProperties(instructorInfo, cluInstructor, new String[] { "attributes" }); cluInstructor.setAttributes(LuServiceAssembler.toGenericAttributes( CluInstructorAttribute.class, instructorInfo .getAttributes(), cluInstructor, luDao)); clu.getInstructors().add(cluInstructor); } // Now delete anything left over for (Entry entry : oldInstructorMap.entrySet()) { luDao.delete(entry.getValue()); } if (cluInfo.getStdDuration() != null) { if (clu.getStdDuration() == null) { clu.setStdDuration(new TimeAmount()); } BeanUtils.copyProperties(cluInfo.getStdDuration(), clu .getStdDuration()); } else if (clu.getStdDuration() != null) { luDao.delete(clu.getStdDuration()); } // Update the LuCodes // Get a map of Id->object of all the currently persisted objects in the // list Map oldLuCodeMap = new HashMap(); for (LuCode luCode : clu.getLuCodes()) { oldLuCodeMap.put(luCode.getId(), luCode); } clu.getLuCodes().clear(); // Loop through the new list, if the item exists already update and // remove from the list // otherwise create a new entry for (LuCodeInfo luCodeInfo : cluInfo.getLuCodes()) { LuCode luCode = oldLuCodeMap.remove(luCodeInfo.getId()); if (luCode == null) { luCode = new LuCode(); } else { if (!String.valueOf(luCode.getVersionNumber()).equals( luCodeInfo.getMetaInfo().getVersionInd())) { ]]> () { @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); } } } } ]]> getGradeRostersByGraderAndTerm(String graderId, String termId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getGradeRostersByGraderAndTerm(graderId, termId, context); } @Override public List getFinalGradeRostersForCourseOffering(String courseOfferingId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getGradeRostersForActivityOffering(courseOfferingId, context); } @Override public List getFinalGradeRostersForActivityOffering(String activityOfferingId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getFinalGradeRostersForActivityOffering(activityOfferingId, context); } @Override public List getGradeRostersForActivityOffering(String activityOfferingId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getGradeRostersForActivityOffering(activityOfferingId, context); } @Override public GradeRosterInfo buildInterimGradeRosterByType(String courseOfferingId, List activityOfferingIds, String rosterTypeKey, ContextInfo context) throws AlreadyExistsException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().buildInterimGradeRosterByType(courseOfferingId, activityOfferingIds, rosterTypeKey, context); } @Override public GradeRosterInfo updateInterimGradeRoster(GradeRosterInfo gradeRoster, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { return getNextDecorator().updateInterimGradeRoster(gradeRoster, context); } @Override public StatusInfo deleteInterimGradeRoster(String gradeRosterId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().deleteInterimGradeRoster(gradeRosterId, context); } @Override public GradeRosterInfo updateFinalGradeRosterState(String gradeRosterId, String stateKey, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { return getNextDecorator().updateFinalGradeRosterState(gradeRosterId, stateKey, context); } @Override public List validateGradeRoster(GradeRosterInfo gradeRoster, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { return getNextDecorator().validateGradeRoster(gradeRoster, context); } @Override public GradeRosterEntryInfo getGradeRosterEntry(String gradeRosterEntryId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getGradeRosterEntry(gradeRosterEntryId, context); } @Override public List getGradeRosterEntriesByIds(List gradeRosterEntryIds, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getGradeRosterEntriesByIds(gradeRosterEntryIds, context); } @Override public List getGradeRosterEntriesByRosterId(String gradeRosterId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getGradeRosterEntriesByRosterId(gradeRosterId, context); } @Override public GradeRosterEntryInfo addEntrytoInterimRoster(GradeRosterEntryInfo gradeRosterEntry, String gradeRosterId, ]]> > excludedViews = new ArrayList>(); excludedViews.add(ProgramSections.PROGRAM_REQUIREMENTS_EDIT); excludedViews.add(ProgramSections.SUPPORTING_DOCUMENTS_EDIT); excludedViews.add(ProgramSections.SUMMARY); addCommonButton(ProgramProperties.get().program_menu_sections(), saveButton, excludedViews); addCommonButton(ProgramProperties.get().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); ]]> (0)); } List adminOrgs = clu.getAdminOrgs(); for (AdminOrgInfo orgInfo : cluInfo.getAdminOrgs()) { CluAdminOrg instructor = new CluAdminOrg(); BeanUtils.copyProperties(orgInfo, instructor, new String[] { "attributes" }); instructor.setAttributes(LuServiceAssembler.toGenericAttributes( CluAdminOrgAttribute.class, orgInfo.getAttributes(), instructor, luDao)); instructor.setClu(clu); adminOrgs.add(instructor); } if (cluInfo.getPrimaryInstructor() != null) { CluInstructor primaryInstructor = new CluInstructor(); BeanUtils.copyProperties(cluInfo.getPrimaryInstructor(), primaryInstructor, new String[] { "attributes" }); primaryInstructor.setAttributes(LuServiceAssembler .toGenericAttributes(CluInstructorAttribute.class, cluInfo .getPrimaryInstructor().getAttributes(), primaryInstructor, luDao)); clu.setPrimaryInstructor(primaryInstructor); } if (clu.getInstructors() == null) { clu.setInstructors(new ArrayList(0)); } List instructors = clu.getInstructors(); for (CluInstructorInfo instructorInfo : cluInfo.getInstructors()) { CluInstructor instructor = new CluInstructor(); BeanUtils.copyProperties(instructorInfo, instructor, new String[] { "attributes" }); instructor.setAttributes(LuServiceAssembler.toGenericAttributes( CluInstructorAttribute.class, instructorInfo .getAttributes(), instructor, luDao)); instructors.add(instructor); } if (cluInfo.getStdDuration() != null) { clu.setStdDuration(LuServiceAssembler.toTimeAmount(cluInfo .getStdDuration())); } if (clu.getLuCodes() == null) { clu.setLuCodes(new ArrayList(0)); } List luCodes = clu.getLuCodes(); for (LuCodeInfo luCodeInfo : cluInfo.getLuCodes()) { LuCode luCode = new LuCode(); luCode.setAttributes(LuServiceAssembler.toGenericAttributes( LuCodeAttribute.class, luCodeInfo.getAttributes(), luCode, luDao)); BeanUtils.copyProperties(luCodeInfo, luCode, new String[] { "attributes", "metaInfo" }); ]]> GenericQueryResults forRowResults(final Class queryClass, final QueryByCriteria criteria, final Criteria jpaCriteria, CountFlag flag, LookupCustomizer.Transform transform) { final Query jpaQuery = new org.kuali.rice.core.framework.persistence.jpa.criteria.QueryByCriteria(entityManager, jpaCriteria).toQuery(); final GenericQueryResults.Builder results = GenericQueryResults.Builder.create(); //ojb's is 1 based, our query api is zero based jpaQuery.setFirstResult(criteria.getStartAtIndex() != null ? criteria.getStartAtIndex() : 0); if (criteria.getMaxResults() != null) { //adding one to MaxResults in order to retrieve //one extra row so that the MoreResultsAvailable field can be set jpaQuery.setMaxResults(criteria.getMaxResults() + 1); } @SuppressWarnings("unchecked") final List rows = new ArrayList(jpaQuery.getResultList()); if (flag == CountFlag.INCLUDE) { results.setTotalRowCount(rows.size()); } if (criteria.getMaxResults() != null && rows.size() > criteria.getMaxResults()) { results.setMoreResultsAvailable(true); //remove the extra row that was returned rows.remove(criteria.getMaxResults().intValue() + 1); } results.setResults(transformResults(rows, transform)); return results.build(); } private static List transformResults(List results, LookupCustomizer.Transform transform) { final List list = new ArrayList(); for (T r : results) { list.add(transform.apply(r)); } return list; } /** gets results where only the count is requested. */ private GenericQueryResults forCountOnly(final Class queryClass, final QueryByCriteria criteria, final Criteria jpaCriteria) { final Query jpaQuery = new org.kuali.rice.core.framework.persistence.jpa.criteria.QueryByCriteria(entityManager, jpaCriteria).toQuery(); final GenericQueryResults.Builder results = GenericQueryResults.Builder.create(); // TODO : There has to be a better way to do this. results.setTotalRowCount(jpaQuery.getResultList().size()); return results.build(); } /** adds a predicate to a Criteria.*/ private void addPredicate(Predicate p, Criteria parent, LookupCustomizer.Transform transform) { ]]> (0)); } List offeredAtpTypes = clu.getOfferedAtpTypes(); for (String atpTypeKey : cluInfo.getOfferedAtpTypes()) { CluAtpTypeKey cluAtpTypeKey = new CluAtpTypeKey(); cluAtpTypeKey.setAtpTypeKey(atpTypeKey); cluAtpTypeKey.setClu(clu); offeredAtpTypes.add(cluAtpTypeKey); } // FEE INFO if (cluInfo.getFeeInfo() != null) { CluFee cluFee = null; try { cluFee = LuServiceAssembler.toCluFee(clu, false, cluInfo .getFeeInfo(), luDao); } catch (VersionMismatchException e) { // Version Mismatch Should Happen only for updates } clu.setFee(cluFee); } if (cluInfo.getAccountingInfo() != null) { CluAccounting cluAccounting = new CluAccounting(); cluAccounting.setAttributes(LuServiceAssembler.toGenericAttributes( CluAccountingAttribute.class, cluInfo.getAccountingInfo() .getAttributes(), cluAccounting, luDao)); cluAccounting.setAffiliatedOrgs(LuServiceAssembler .toAffiliatedOrgs(false, cluAccounting.getAffiliatedOrgs(), cluInfo.getAccountingInfo().getAffiliatedOrgs(), luDao)); clu.setAccounting(cluAccounting); } clu.setAttributes(LuServiceAssembler.toGenericAttributes( CluAttribute.class, cluInfo.getAttributes(), clu, luDao)); if (cluInfo.getIntensity() != null) { clu.setIntensity(LuServiceAssembler .toAmount(cluInfo.getIntensity())); } if (clu.getCampusLocations() == null) { clu.setCampusLocations(new ArrayList(0)); } List locations = clu.getCampusLocations(); for (String locationName : cluInfo.getCampusLocations()) { CluCampusLocation location = new CluCampusLocation(); location.setCampusLocation(locationName); location.setClu(clu); locations.add(location); } if (clu.getAccreditations() == null) { clu.setAccreditations(new ArrayList(0)); } List accreditations = clu.getAccreditations(); for (AccreditationInfo accreditationInfo : cluInfo.getAccreditations()) { CluAccreditation accreditation = new CluAccreditation(); BeanUtils.copyProperties(accreditationInfo, accreditation, new String[] { "attributes" }); accreditation.setAttributes(LuServiceAssembler.toGenericAttributes( CluAccreditationAttribute.class, accreditationInfo .getAttributes(), accreditation, luDao)); accreditations.add(accreditation); } // Now copy all not standard properties BeanUtils.copyProperties(cluInfo, clu, new String[] { "luType", "officialIdentifier", "alternateIdentifiers", "descr", "luCodes", "primaryInstructor", "instructors", "stdDuration", "offeredAtpTypes", "feeInfo", "accountingInfo", "attributes", ]]> toCluIdentifierInfos( List entities) { List dtos = new ArrayList( entities.size()); if(entities!=null){ for (CluIdentifier entity : entities) { dtos.add(toCluIdentifierInfo(entity)); } } return dtos; } public static CluIdentifierInfo toCluIdentifierInfo(CluIdentifier entity) { if (entity == null) { return null; } CluIdentifierInfo dto = new CluIdentifierInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "attributes" }); dto.setAttributes(toAttributeMap(entity.getAttributes())); return dto; } public static List toCluInstructorInfos( List entities) { List dtos = new ArrayList( entities.size()); if(entities!=null){ for (CluInstructor entity : entities) { dtos.add(toCluInstructorInfo(entity)); } } return dtos; } public static CluInstructorInfo toCluInstructorInfo(CluInstructor entity) { if (entity == null) { return null; } CluInstructorInfo dto = new CluInstructorInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "id", "attributes" }); dto.setAttributes(toAttributeMap(entity.getAttributes())); return dto; } public static AmountInfo toAmountInfo(Amount entity) { if (entity == null) { return null; } AmountInfo dto = new AmountInfo(); BeanUtils.copyProperties(entity, dto); return dto; } public static TimeAmountInfo toTimeAmountInfo(TimeAmount entity) { if (entity == null) { return null; } TimeAmountInfo dto = new TimeAmountInfo(); BeanUtils.copyProperties(entity, dto); return dto; } public static List toLuCodeInfos(List entities) { List dtos = new ArrayList(entities.size()); if(entities!=null){ for (LuCode entity : entities) { dtos.add(toLuCodeInfo(entity)); } } return dtos; } public static LuCodeInfo toLuCodeInfo(LuCode entity) { if (entity == null) { return null; } LuCodeInfo dto = new LuCodeInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "attributes", "metInfo" }); dto.setAttributes(toAttributeMap(entity.getAttributes())); dto.setMetaInfo(toMetaInfo(entity.getMeta(), entity.getVersionNumber())); ]]> 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); } } } private void removeSwappableSection(String key){ Section section = swapSectionMap.get(key); if(section != null){ if(!deleted.contains(section)){ deleted.add(section); } if(section.getLayout().isVisible()){ section.enableValidation(false); section.getLayout().setVisible(false); } } } public void enableConfirmation(boolean enable){ showConfirmation = enable; } public String addSection(Section section, String swapKey){ swapSectionMap.put(swapKey, section); String key = layout.addLayout(section.getLayout()); section.getLayout().setVisible(false); if(selectableWidget.getSelectedItems().contains(swapKey)){ handleSelection(); } sections.add(section); return key; } public String addSection(String key, Section section, String swapKey){ swapSectionMap.put(swapKey, section); section.getLayout().setKey(key); String rkey = layout.addLayout(section.getLayout()); section.getLayout().setVisible(false); if(selectableWidget.getSelectedItems().contains(swapKey)){ handleSelection(); } sections.add(section); return rkey; } @Override public String addSection(Section section) { throw new UnsupportedOperationException("Sections can be added to swappable section only through " + "the addSection(Section section, String swapKey) method"); } @Override public String addSection(String key, Section section) { throw new UnsupportedOperationException("Sections can be added to swappable section only through " + "the addSection(Section section, String swapKey) method"); } ]]> 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++)); ]]> 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 = new CourseWidget(); courseWidget.addGetCluNameCallback(new Callback() { @Override public void exec(Object id) { ]]> > termResolvers; private ExecutionOptions executionOptions; private Map contextQualifiers; private SelectionCriteria selectionCriteria; public List> getTermResolvers() { return termResolvers; } public void setTermResolvers(List> termResolvers) { this.termResolvers = termResolvers; } public ExecutionOptions getExecutionOptions() { return executionOptions; } public void setExecutionOptions(ExecutionOptions executionOptions) { this.executionOptions = executionOptions; } public Map getContextQualifiers() { return contextQualifiers; } public void setContextQualifiers(Map contextQualifiers) { this.contextQualifiers = contextQualifiers; } public SelectionCriteria getSelectionCriteria() { return selectionCriteria; } public void setSelectionCriteria(SelectionCriteria selectionCriteria) { this.selectionCriteria = selectionCriteria; } public RulesEvaluationUtil() { executionOptions = new ExecutionOptions(); executionOptions.setFlag(ExecutionFlag.LOG_EXECUTION, true); executionOptions.setFlag(ExecutionFlag.EVALUATE_ALL_PROPOSITIONS, true); contextQualifiers = new HashMap(); contextQualifiers.put("docTypeName", "Course.PreRequisities"); Map empty = Collections.emptyMap(); selectionCriteria = SelectionCriteria.createCriteria(new DateTime(), contextQualifiers, empty); } private ProviderBasedEngine buildEngine(Agenda agenda) { Context context = new BasicContext(Arrays.asList(agenda), termResolvers); ContextProvider contextProvider = new ManualContextProvider(context); ProviderBasedEngine engine = new ProviderBasedEngine(); engine.setContextProvider(contextProvider); return engine; } public EngineResults executeAgenda(Agenda agenda, Map executionFacts) { Engine engine = buildEngine(agenda); EngineResults results = engine.execute(selectionCriteria, executionFacts, executionOptions); return results; } public List getFailedRequirementsFromEngineResults(EngineResults results, Map reqComponentPropositionMap) { List failedRequirements = new ArrayList(); List events = results.getResultsOfType(ResultEvent.PROPOSITION_EVALUATED); for (ResultEvent e : events) { if (!e.getResult()) { Proposition prop = (Proposition) e.getSource(); failedRequirements.add(reqComponentPropositionMap.get(prop)); } } return failedRequirements; } } ]]> 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; } ]]> > Object getVal(U toConv) { Object o = toConv.getValue(); if (o instanceof DateTime) { return new Timestamp(((DateTime) o).getMillis()); } return o; } //this is unsafe b/c values could be converted resulting in a classcast exception @SuppressWarnings("unchecked") private static > Set getValsUnsafe(Set toConv) { return (Set) getVals(toConv); } private static Set getVals(Set> toConv) { final Set values = new HashSet(); for (CriteriaValue value : toConv) { values.add(getVal(value)); } return values; } //eliding performance for function composition.... private static Set toUpper(Set strs) { final Set values = new HashSet(); for (String value : strs) { values.add(value.toUpperCase()); } return values; } private String genUpperFunc(String pp) { if (StringUtils.contains(pp, "__JPA_ALIAS[[")) { pp = "UPPER(" + pp + ")"; } else { pp = "UPPER(__JPA_ALIAS[[0]]__." + pp + ")"; } return pp; } /** * @param entityManager the entityManager to set */ public void setEntityManager(EntityManager entityManager) { this.entityManager = entityManager; } /** this is a fatal error since this implementation should support all known predicates. */ private static class UnsupportedPredicateException extends RuntimeException { private UnsupportedPredicateException(Predicate predicate) { super("Unsupported predicate [" + String.valueOf(predicate) + "]"); } } /** this is a fatal error since this implementation should support all known count flags. */ private static class UnsupportedCountFlagException extends RuntimeException { private UnsupportedCountFlagException(CountFlag flag) { super("Unsupported predicate [" + String.valueOf(flag) + "]"); } } } ]]> 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; } ]]> 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; } //Method to build the light box for the doc search private void buildDocSearchPanel(){ if (docSearch == null){ docSearch = new Frame(); docSearch.setSize("700px", "500px"); docSearch.setUrl(docSearchUrl); VerticalPanel docSearchPanel = new VerticalPanel(); docSearchPanel.add(docSearch); KSButton closeActionButton = new KSButton(getMessage("wrapperPanelClose")); closeActionButton.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { docSearchDialog.hide(); } }); docSearchPanel.add(closeActionButton); docSearchDialog.setWidget(docSearchPanel); ]]> getEnumerations(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getEnumerations(contextInfo); } @Override public EnumerationInfo getEnumeration(String enumerationKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getEnumeration(enumerationKey, contextInfo); } @Override public List getEnumeratedValues(String enumerationKey, String contextTypeKey, String contextValue, Date contextDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getEnumeratedValues(enumerationKey, contextTypeKey, contextValue, contextDate, contextInfo); } @Override public List validateEnumeratedValue(String validationTypeKey, String enumerationKey, String code, EnumeratedValueInfo enumeratedValueInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().validateEnumeratedValue(validationTypeKey, enumerationKey, code, enumeratedValueInfo, contextInfo); } @Override public EnumeratedValueInfo updateEnumeratedValue(String enumerationKey, String code, EnumeratedValueInfo enumeratedValueInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { return getNextDecorator().updateEnumeratedValue(enumerationKey, code, enumeratedValueInfo, contextInfo); } @Override public StatusInfo deleteEnumeratedValue(String enumerationKey, String code, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().deleteEnumeratedValue(enumerationKey, code, contextInfo); } @Override public EnumeratedValueInfo addEnumeratedValue(String enumerationKey, String code, EnumeratedValueInfo enumeratedValueInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { return getNextDecorator().addEnumeratedValue(enumerationKey, code, enumeratedValueInfo, contextInfo); } } ]]> 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); } } ]]> > 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) { ]]> object of all the currently persisted objects in the // list Map oldVariantMap = new HashMap(); for (CluPublicationVariant variant : cluPub.getVariants()) { oldVariantMap.put(variant.getKey(), variant); } cluPub.getVariants().clear(); // Loop through the new list, if the item exists already update and // remove from the list otherwise create a new entry CluPublicationVariant variant = null; for (FieldInfo fieldInfo : cluPublicationInfo.getVariants()) { if (!oldVariantMap.containsKey(fieldInfo.getId())) { // New variant key variant = new CluPublicationVariant(); variant.setKey(fieldInfo.getId()); variant.setValue(fieldInfo.getValue()); } else { // Update existing variant variant = oldVariantMap.get(fieldInfo.getId()); variant.setValue(fieldInfo.getValue()); oldVariantMap.remove(fieldInfo.getId()); } cluPub.getVariants().add(variant); } // Now delete anything left over for (Entry entry : oldVariantMap.entrySet()) { luDao.delete(entry.getValue()); } cluPub.setClu(clu); cluPub.setEndCycle(cluPublicationInfo.getEndCycle()); cluPub.setStartCycle(cluPublicationInfo.getStartCycle()); cluPub.setEffectiveDate(cluPublicationInfo.getEffectiveDate()); cluPub.setExpirationDate(cluPublicationInfo.getExpirationDate()); cluPub.setState(cluPublicationInfo.getState()); cluPub.setType(type); cluPub.setAttributes(LuServiceAssembler.toGenericAttributes(CluPublicationAttribute.class, cluPublicationInfo.getAttributes(), cluPub, luDao)); CluPublication updated = luDao.update(cluPub); return LuServiceAssembler.toCluPublicationInfo(updated); } @Override @Transactional(readOnly=false) public StatusInfo deleteCluPublication(String cluPublicationId) ]]> getEnumerations(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getEnumerations(contextInfo); } @Override public EnumerationInfo getEnumeration(String enumerationKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getEnumeration(enumerationKey, contextInfo); } @Override public List getEnumeratedValues(String enumerationKey, String contextTypeKey, String contextValue, Date contextDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().getEnumeratedValues(enumerationKey, contextTypeKey, contextValue, contextDate, contextInfo); } @Override public List validateEnumeratedValue(String validationTypeKey, String enumerationKey, String code, EnumeratedValueInfo enumeratedValueInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().validateEnumeratedValue(validationTypeKey, enumerationKey, code, enumeratedValueInfo, contextInfo); } @Override public EnumeratedValueInfo updateEnumeratedValue(String enumerationKey, String code, EnumeratedValueInfo enumeratedValueInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { return getNextDecorator().updateEnumeratedValue(enumerationKey, code, enumeratedValueInfo, contextInfo); } @Override public StatusInfo deleteEnumeratedValue(String enumerationKey, String code, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { return getNextDecorator().deleteEnumeratedValue(enumerationKey, code, contextInfo); } @Override public EnumeratedValueInfo addEnumeratedValue(String enumerationKey, String code, EnumeratedValueInfo enumeratedValueInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { return getNextDecorator().addEnumeratedValue(enumerationKey, code, enumeratedValueInfo, contextInfo); } } ]]> 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); } } ]]> 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; } } ]]> fieldMap = buildFieldMap(requirementComponent.getReqCompFields()); Float testScore = Float.parseFloat(fieldMap.get("kuali.reqComponent.field.type.test.score").getValue()); String testSetId = fieldMap.get("kuali.reqComponent.field.type.test.cluSet.id").getValue(); // TODO //Proposition result = new TestScoreCompareProposition(ComparisonOperator.GREATER_THAN_EQUAL, testSetId, testScore); //return result; } return null; } private Proposition buildMaxCompletedCountProposition(ReqComponentInfo requirementComponent) { Map fieldMap = buildFieldMap(requirementComponent.getReqCompFields()); Proposition result = null; if (requirementComponent.getTypeKey().equals(StatementServiceConstants.NOT_COMPLETED_COURSE_REQ_COM_TYPE)) { ]]> 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; } } ]]> >() { @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(ProgramProperties.get().common_savingData()) { @Override public void onSuccess(DataSaveResult result) { super.onSuccess(result); if (result.getValidationResults() != null && !result.getValidationResults().isEmpty()) { if (previousState != null) { ProgramUtils.setStatus(programModel, previousState.getValue()); } isValid(result.getValidationResults(), false, true); StringBuilder msg = new StringBuilder(); for (ValidationResultInfo vri : result.getValidationResults()) { msg.append(vri.getMessage()); } okCallback.exec(false); } else { previousState = null; programModel.setRoot(result.getValue()); setHeaderTitle(); setStatus(); ]]> values = getVals(p.getValues()); parent.in(pp, values); } else if (p instanceof InIgnoreCasePredicate) { final Set values = toUpper(getValsUnsafe(((InIgnoreCasePredicate) p).getValues())); parent.in(genUpperFunc(pp), values); } else if (p instanceof NotInPredicate) { final Set values = getVals(p.getValues()); parent.notIn(pp, values); } else if (p instanceof NotInIgnoreCasePredicate) { final Set values = toUpper(getValsUnsafe(((NotInIgnoreCasePredicate) p).getValues())); parent.notIn(genUpperFunc(pp), values); } else { throw new UnsupportedPredicateException(p); } } /** adds a composite predicate to a Criteria. */ private void addCompositePredicate(final CompositePredicate p, final Criteria parent, LookupCustomizer.Transform transform) { ]]> 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; } } ]]> toGenericTypeKeyList(List> typeEntities) { List typeKeys = new ArrayList(); if (typeEntities != null) { for (Type typeEntity : typeEntities) { typeKeys.add(typeEntity.getId()); } } return typeKeys; } protected static MetaInfo toMetaInfo(MetaEntity metaEntity) { if (metaEntity == null) { return null; } return toMetaInfo(metaEntity.getMeta(), metaEntity.getVersionNumber()); } protected static MetaInfo toMetaInfo(Meta meta, Long versionInd) { MetaInfo metaInfo = new MetaInfo(); // If there was a meta passed in then copy the values if (meta != null) { BeanUtils.copyProperties(meta, metaInfo); } if (versionInd == null) { metaInfo.setVersionInd(null); } else { metaInfo.setVersionInd(versionInd.toString()); } return metaInfo; } public static T toRichText(Class richTextClass, RichTextInfo richTextInfo) { if (richTextInfo == null) { return null; } T richText = null; try { richText = richTextClass.newInstance(); BeanUtils.copyProperties(richTextInfo, richText); } catch (Exception e) { throw new RuntimeException(e); } return richText; } public static RichTextInfo toRichTextInfo(RichText entity) { if (entity == null) { return null; } RichTextInfo dto = new RichTextInfo(); ]]> TRANSLATABLE_STATEMENT_TYPES = Collections.singleton(StatementServiceConstants.PREREQUISITE_STATEMENT_TYPE); //private LrcService lrcService; //private ApplicationContext appContext; private static final List validRequirementComponentTypes; static { String[] REQ_COM_TYPE_SEED_DATA = { StatementServiceConstants.ENROLLED_COURSE_REQ_COM_TYPE, StatementServiceConstants.N_OF_REQUIRED_COURSES_ENROLLED_REQ_COM_TYPE, StatementServiceConstants.ALL_OF_REQUIRED_COURSES_ENROLLED_REQ_COM_TYPE, //"kuali.reqComponent.type.course.courseset.grade.max", //"kuali.reqComponent.type.course.permission.org.required", //"kuali.reqComponent.type.course.permission.instructor.required", //"kuali.reqComponent.type.course.test.score.min", //"kuali.reqComponent.type.course.courseset.credits.completed.nof", //"kuali.reqComponent.type.course.courseset.gpa.min", //"kuali.reqComponent.type.course.courseset.grade.min" //"kuali.reqComponent.type.course.courseset.nof.grade.min", StatementServiceConstants.ALL_OF_REQUIRED_COURSES_COMPLETED_REQ_COM_TYPE, StatementServiceConstants.COMPLETED_COURSE_REQ_COM_TYPE, StatementServiceConstants.N_OF_REQUIRED_COURSES_COMPLETED_REQ_COM_TYPE, StatementServiceConstants.MAX_N_OF_COURSES_COMPLETED_REQ_COM_TYPE, StatementServiceConstants.NONE_OF_COURSES_COMPLETED_REQ_COM_TYPE, StatementServiceConstants.NOT_COMPLETED_COURSE_REQ_COM_TYPE }; validRequirementComponentTypes = Collections.unmodifiableList(Arrays.asList(REQ_COM_TYPE_SEED_DATA)); } public static class TranslationResults { public Agenda agenda; public Map reqComponentPropositionMap = new HashMap(); } public TranslationResults translateStatement(StatementTreeViewInfo statementTreeView, Map qualifierMap) throws InvalidParameterException { TranslationResults results = new TranslationResults(); Proposition rootProposition = buildPropositionFromComponents(statementTreeView, results.reqComponentPropositionMap); Rule rule = new BasicRule(rootProposition, null); List treeEntries = new ArrayList(); treeEntries.add(new BasicAgendaTreeEntry(rule)); AgendaTree agendaTree = new BasicAgendaTree(treeEntries); if (qualifierMap == null) { qualifierMap = Collections.emptyMap(); } results.agenda = new BasicAgenda(qualifierMap, agendaTree); return results; } private Proposition buildPropositionFromComponents(StatementTreeViewInfo statementTreeView, Map reqComponentPropositionMap) throws InvalidParameterException { if (statementTreeView.getTypeKey().equals(StatementServiceConstants.PREREQUISITE_STATEMENT_TYPE)) { ]]> 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); } }; } ]]> validationResults) { this(message, validationResults, null); } public DataValidationErrorException(String message, List validationResults, Throwable cause) { super(message, cause); this.validationResults = validationResults; } public DataValidationErrorException(String message, Throwable cause) { super(message, cause); } public DataValidationErrorException(String message) { super(message); } public DataValidationErrorException(Throwable cause) { super(cause); } public List getValidationResults() { return validationResults; } @Override public void printStackTrace(PrintStream s) { super.printStackTrace(s); logValidationResults(); } @Override public void printStackTrace(PrintWriter s) { super.printStackTrace(s); logValidationResults(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(super.getMessage()).append("\n"); if (validationResults != null) { sb.append("Validation Results: \n"); for (ValidationResultInfo info:validationResults) { sb.append(info).append("\n"); } } else { sb.append("Validation Results: None set."); } return sb.toString(); } private void logValidationResults() { LOG.debug(toString()); } } ]]> 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 = "/" + KewApiConstants.DOCUMENT_CONTENT_ELEMENT + "/" + KewApiConstants.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:" + XmlJotter.jotDocument(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) { ]]> campusLocations = new ArrayList(entity .getCampusLocations().size()); for (CluCampusLocation cluCamp : entity.getCampusLocations()) { campusLocations.add(cluCamp.getCampusLocation()); } dto.setCampusLocations(campusLocations); } dto.setIntensity(toAmountInfo(entity.getIntensity())); dto.setVersionInfo(toVersionInfo(entity.getVersion())); return dto; } public static List toCluSetInfos(List entities) { List dtos = new ArrayList(entities.size()); if (entities != null) { for (CluSet entity : entities) { dtos.add(toCluSetInfo(entity)); } } return dtos; } public static CluSet toCluSetEntity(CluSetInfo cluSetInfo, LuDao luDao) throws InvalidParameterException, DoesNotExistException { CluSet cluSet = new CluSet(); BeanUtils.copyProperties(cluSetInfo, cluSet, new String[] { "id", "descr", "attributes", "metaInfo", "membershipQuery" }); ]]> offeredAtpTypes = new ArrayList(entity .getOfferedAtpTypes().size()); for (CluAtpTypeKey key : entity.getOfferedAtpTypes()) { offeredAtpTypes.add(key.getAtpTypeKey()); } dto.setOfferedAtpTypes(offeredAtpTypes); } dto.setFeeInfo(toCluFeeInfo(entity.getFee())); dto.setAccountingInfo(toCluAccountingInfo(entity.getAccounting())); dto.setAttributes(toAttributeMap(entity.getAttributes())); dto.setMetaInfo(toMetaInfo(entity.getMeta(), entity.getVersionNumber())); ]]> 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; } ]]> termInfoList = academicCalendarService.getTermsForAcademicCalendar(dataObjectKeys.get("key"), context); for (TermInfo termInfo:termInfoList){ TermWrapper termWrapper = new TermWrapper(); termWrapper.setTermInfo(termInfo); List keyDateInfoList = academicCalendarService.getKeyDatesForTerm(termInfo.getId(), context); for (KeyDateInfo keyDateInfo : keyDateInfoList){ if(AtpServiceConstants.MILESTONE_INSTRUCTIONAL_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setClassesMeetDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_REGISTRATION_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setRegistrationPeriod(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_DROP_DATE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setDropPeriodEndsDate(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_FINAL_EXAM_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setFinalExaminationsDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_GRADES_DUE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setGradesDueDate(keyDateInfo); } } termWrapperList.add(termWrapper); } academicCalendarWrapper.setTermWrapperList(termWrapperList); return academicCalendarWrapper; }catch (InvalidParameterException ipe){ }catch (MissingParameterException mpe){ }catch (OperationFailedException ofe){ }catch (PermissionDeniedException pde){ }catch (DoesNotExistException dee){ } return null; } ]]> getCluSetWidgetList(StatementTreeViewInfo rule) { Map widgetList = new HashMap(); Set cluSetIds = new HashSet(); findCluSetIds(rule, cluSetIds); for (String clusetId : cluSetIds) { widgetList.put(clusetId, new CluSetDetailsWidget(clusetId, cluSetRetriever)); } return widgetList; } //TODO: This code copied from Program summary, need to create reusable version for this and program summary private void findCluSetIds(StatementTreeViewInfo rule, Set 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()); } } } } } ]]> 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 ]]> 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(); } @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); } ]]> 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; } } ]]> validationResultInfos = getCourseRegistrationService().validateRegRequest(regRequest, context); if (CollectionUtils.isEmpty(validationResultInfos)) { regRequest = getCourseRegistrationService().createRegRequest(regRequest, context); registrationForm.getRegistrationGroupWrappersById().put(regGroupWrapper.getRegistrationGroup().getId(), regGroupWrapper); } else { StringBuilder builder = new StringBuilder("Found multiple ValidationResultInfo objects after Registration Request validation:\n"); for (ValidationResultInfo resultInfo : validationResultInfos) { builder.append(resultInfo.getMessage()).append("\n"); } throw new RuntimeException(builder.toString()); } //immediately submit the regRequest that was just created processSubmitRegRequest(regRequest, registrationForm, true); } catch (InvalidParameterException e) { throw new RuntimeException(e); } catch (DataValidationErrorException e) { throw new RuntimeException(e); } catch (PermissionDeniedException e) { throw new RuntimeException(e); } catch (OperationFailedException e) { throw new RuntimeException(e); } catch (MissingParameterException e) { throw new RuntimeException(e); } catch (AlreadyExistsException e) { throw new RuntimeException(e); } return getUIFModelAndView(registrationForm); } @RequestMapping(params = "methodToCall=submitRegistration") ]]> void setListItems(ListItems listItems) { if(listItems instanceof ModelListItems){ Callback redrawCallback = new Callback(){ @Override public void exec(T result){ ]]> toCluPublicationVariantInfos( List variants) { if(variants == null){ return new ArrayList(0); } List fields = new ArrayList(); for(CluPublicationVariant variant:variants){ FieldInfo field = new FieldInfo(); field.setId(variant.getKey()); field.setValue(variant.getValue()); fields.add(field); } return fields; } public static List toCluPublicationInfos( List cluPublications) { if(cluPublications == null){ return new ArrayList(0); } List cluPublicationInfos = new ArrayList(cluPublications.size()); for(CluPublication cluPublication:cluPublications){ cluPublicationInfos.add(toCluPublicationInfo(cluPublication)); } return cluPublicationInfos; } } ]]> toLuiLuiRelationInfos( List entities) { List dtos = new ArrayList( entities.size()); if (entities != null) { for (LuiLuiRelation entity : entities) { dtos.add(toLuiLuiRelationInfo(entity)); } } return dtos; } public static LuiLuiRelationInfo toLuiLuiRelationInfo(LuiLuiRelation entity) { if (entity == null) { return null; } LuiLuiRelationInfo dto = new LuiLuiRelationInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "lui", "relatedLui", "attributes" }); dto.setLuiId(entity.getLui().getId()); dto.setRelatedLuiId(entity.getRelatedLui().getId()); dto.setType(entity.getLuLuRelationType().getId()); dto.setAttributes(toAttributeMap(entity.getAttributes())); dto.setMetaInfo(toMetaInfo(entity.getMeta(), entity.getVersionNumber())); ]]> 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 toCluResultInfos(List entities) { List dtos = new ArrayList(); if (entities != null) { for (CluResult entity : entities) { dtos.add(toCluResultInfo(entity)); } } return dtos; } public static List toResultOptionInfos( List entities) { List dtos = new ArrayList(); if (entities != null) { for (ResultOption entity : entities) { dtos.add(toResultOptionInfo(entity)); } } return dtos; } public static ResultOptionInfo toResultOptionInfo(ResultOption entity) { if (entity == null) { return null; } ResultOptionInfo dto = new ResultOptionInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "resultUsageType", "desc" }); if(entity.getResultUsageType() != null) { dto.setResultUsageTypeKey(entity.getResultUsageType().getId()); } dto.setDesc(toRichTextInfo(entity.getDesc())); ]]> 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 + "]"; ]]> 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; } } ]]> holidayInfoList = getAcademicCalendarService().getHolidaysForHolidayCalendar(holidayCalendarInfo.getId(), context); for(HolidayInfo holidayInfo : holidayInfoList){ HolidayWrapper holiday = new HolidayWrapper(); holiday.setHolidayInfo(holidayInfo); TypeInfo typeInfo = getAcademicCalendarService().getHolidayType(holidayInfo.getTypeKey(), context); holiday.setTypeName(typeInfo.getName()); holidays.add(holiday); } holidayCalendarWrapper.setHolidays(holidays); }catch (DoesNotExistException dnee){ System.out.println("call getAcademicCalendarService().getHolidaysForHolidayCalendar(holidayCalendarId, context), and get DoesNotExistException: "+dnee.toString()); }catch (InvalidParameterException ipe){ System.out.println("call getAcademicCalendarService().getHolidaysForHolidayCalendar(holidayCalendarId, context), and get InvalidParameterException: "+ipe.toString()); }catch (MissingParameterException mpe){ System.out.println("call getAcademicCalendarService().getHolidaysForHolidayCalendar(holidayCalendarId, context), and get MissingParameterException: "+mpe.toString()); }catch (OperationFailedException ofe){ System.out.println("call getAcademicCalendarService().getHolidaysForHolidayCalendar(holidayCalendarId, context), and get OperationFailedException: "+ofe.toString()); }catch (PermissionDeniedException pde){ System.out.println("call getAcademicCalendarService().getHolidaysForHolidayCalendar(holidayCalendarId, context), and get PermissionDeniedException: "+pde.toString()); } ]]> 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(buildKeyValue(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; } ]]> 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 getParams() { // if (params == null) { // params = new ArrayList(); // } // return params; // } // // public void setParams(List params) { // this.params = params; // } public List getResults() { ]]> (){ @Override public void handleFailure(Throwable caught) { ]]> toCluFeeRecordInfos( List entities) { List dtos = new ArrayList(); if (entities != null) { for (CluFeeRecord record : entities) { dtos.add(toCluFeeRecordInfo(record)); } } return dtos; } private static CluFeeRecordInfo toCluFeeRecordInfo(CluFeeRecord entity) { if (entity == null) { return null; } CluFeeRecordInfo dto = new CluFeeRecordInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "affiliatedOrgs", "currencyAmount","attributes","descr" }); dto.setAffiliatedOrgs(toAffiliatedOrgInfos(entity.getAffiliatedOrgs())); dto.setFeeAmounts(toFeeAmounts(entity.getFeeAmounts())); dto.setDescr(toRichTextInfo(entity.getDescr())); dto.setAttributes(toAttributeMap(entity.getAttributes())); dto.setMetaInfo(toMetaInfo(entity.getMeta(), entity.getVersionNumber())); ]]> 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); } } } ]]> 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 { ]]> items = this.getSocRolloverResultItemsByResultId(info.getId(), context); int success = 0; int failure = 0; for (SocRolloverResultItemInfo item : items) { if (item.getStateKey().equals(CourseOfferingSetServiceConstants.SUCCESS_RESULT_ITEM_STATE_KEY)) { success++; } else { failure++; } } info.setItemsCreated(success); info.setItemsSkipped(failure); } } catch (Exception ex) { throw new OperationFailedException("unexpected", ex); } } @Override public List getSocRolloverResultsByIds(List rolloverResultIds, ContextInfo context) ]]> ()); } cluSet.setCluSets(null); if(!cluSetInfo.getCluSetIds().isEmpty()) { Set newCluSetIds = new HashSet(cluSetInfo.getCluSetIds()); if(cluSet.getCluSets()!=null){ for (Iterator i = cluSet.getCluSets().iterator(); i.hasNext();) { if (!newCluSetIds.remove(i.next().getId())) { i.remove(); } } } List cluSetList = luDao.getCluSetInfoByIdList(new ArrayList(newCluSetIds)); cluSet.setCluSets(cluSetList); } BeanUtils.copyProperties(cluSetInfo, cluSet, new String[] { "descr", "attributes", "metaInfo", "membershipQuery" }); ]]> 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; } } ]]> searchForSocRolloverResults(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { throw new UnsupportedOperationException("Not supported yet."); } private MetaInfo newMeta(ContextInfo context) { MetaInfo meta = new MetaInfo(); meta.setCreateId(context.getPrincipalId()); meta.setCreateTime(new Date()); meta.setUpdateId(context.getPrincipalId()); meta.setUpdateTime(meta.getCreateTime()); meta.setVersionInd("0"); return meta; } private StatusInfo newStatus() { StatusInfo status = new StatusInfo(); status.setSuccess(Boolean.TRUE); return status; } private MetaInfo updateMeta(MetaInfo old, ContextInfo context) { MetaInfo meta = new MetaInfo(old); meta.setUpdateId(context.getPrincipalId()); meta.setUpdateTime(new Date()); meta.setVersionInd((Integer.parseInt(meta.getVersionInd()) + 1) + ""); return meta; } ]]> oldClus = new HashMap(); for(CluSetJoinVersionIndClu join:cluSet.getCluVerIndIds()){ oldClus.put(join.getCluVersionIndId(), join); } cluSet.getCluVerIndIds().clear(); // Loop through the new list, if the item exists already update and remove from the list otherwise create a new entry for (String newCluId : cluSetInfo.getCluIds()) { CluSetJoinVersionIndClu join = oldClus.remove(newCluId); if (join == null) { join = new CluSetJoinVersionIndClu(); join.setCluSet(cluSet); join.setCluVersionIndId(newCluId); } cluSet.getCluVerIndIds().add(join); } // Now delete anything left over for (Entry entry : oldClus.entrySet()) { luDao.delete(entry.getValue()); } // clean up existing wrappers if any if (cluSetInfo.getId() != null) { CluSetInfo originalCluSet = getCluSetInfo(cluSetInfo.getId()); ]]> listOne = new ArrayList(); listOne.add( KimConstants.AttributeConstants.DOCUMENT_NUMBER ); newRequiredAttributes.add(listOne); // add document type name and KEW application id as one required attribute set List listTwo = new ArrayList(); listTwo.add( KimConstants.AttributeConstants.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.Map) **/ @Override protected void validateRequiredAttributesAgainstReceived(Map receivedAttributes){ KimQualificationHelper.validateRequiredAttributesAgainstReceived(newRequiredAttributes, receivedAttributes, isCheckFutureRequests(), COMMA_SEPARATOR); ]]> fieldMap = buildFieldMap(requirementComponent.getReqCompFields()); String orgId = fieldMap.get("kuali.reqComponent.field.type.org.id").getValue(); // TODO // result = new OrgPermissionProposition(orgId); } else { // result = new InstructorPermissionProposition(); } return result; } private Proposition buildCreditCountProposition(ReqComponentInfo requirementComponent) { Proposition result = null; Map fieldMap = buildFieldMap(requirementComponent.getReqCompFields()); Integer minimumCredits = Integer.parseInt(fieldMap.get(StatementServiceConstants.INTEGER_REQ_COM_FIELD_TYPE).getValue()); String courseSetId = fieldMap.get(StatementServiceConstants.COURSE_SET_ID_REQ_COM_FIELD_TYPE).getValue(); // TODO // result = new CourseSetCreditsProposition(courseSetId, ComparisonOperator.GREATER_THAN_EQUAL, minimumCredits); return result; } // -- kuali.reqComponent.type.course.courseset.gpa.min // -- kuali.reqComponent.type.course.courseset.grade.min // -- kuali.reqComponent.type.course.courseset.grade.max // -- kuali.reqComponent.type.course.courseset.nof.grade.min private Proposition buildGradeComparisonProposition(ReqComponentInfo requirementComponent) { Proposition result = null; Map fieldMap = buildFieldMap(requirementComponent.getReqCompFields()); String courseSetId = fieldMap.get(StatementServiceConstants.COURSE_SET_ID_REQ_COM_FIELD_TYPE).getValue(); ComparisonOperator operator = null; if (requirementComponent.getTypeKey().endsWith("min")) { ]]> 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; } ]]> clus, CluSet parentCluSet) throws DoesNotExistException { List processedCluSetIds = new ArrayList(); doFindClusInCluSet(processedCluSetIds, clus, parentCluSet); } private void doFindClusInCluSet(List processedCluSetIds, List clus, CluSet parentCluSet) { for (CluSetJoinVersionIndClu join : parentCluSet.getCluVerIndIds()) { if (!clus.contains(join.getCluVersionIndId())) { clus.add(join.getCluVersionIndId()); } } if(parentCluSet.getCluSets()!=null){ for (CluSet cluSet : parentCluSet.getCluSets()) { // This condition avoids infinite recursion problem if (!processedCluSetIds.contains(cluSet.getId())) { processedCluSetIds.add(cluSet.getId()); doFindClusInCluSet(processedCluSetIds, clus, cluSet); } } } } @Override public ObjectStructureDefinition getObjectStructure(String objectTypeKey) { ]]> 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); } } } ]]> toCluInfos(List entities) { // return an empty list (Effective Java 2ndEd, item #43) if (entities == null) { return new ArrayList(0); } List dtos = new ArrayList(entities.size()); for (Clu entity : entities) { dtos.add(toCluInfo(entity)); } return dtos; } public static CluInfo toCluInfo(Clu entity) { if (entity == null) { return null; } CluInfo dto = new CluInfo(); // copy all simple fields - exclude complex data types BeanUtils.copyProperties(entity, dto, new String[] { "officialIdentifier", "alternateIdentifiers", "descr", "participatingOrgs", "primaryInstructor", "instructors", "stdDuration", "luCodes", "credit", "offeredAtpTypes", "fee", "accounting", "intensity", "campusLocationList", "accreditationList", "adminOrgs", "attributes", "metaInfo", "versionInfo" }); ]]> buildFieldMap(List reqCompFields) { Map result = new HashMap(reqCompFields.size()); for (ReqCompFieldInfo field : reqCompFields) { result.put(field.getTypeKey(), field); ]]> >() { @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_PROGRAM.getLocation(), context); ]]> instructions = new HashMap(); // private Map categories = new HashMap (); // private Map processCategoryMap = new HashMap (); private MetaInfo newMeta(ContextInfo context) { MetaInfo meta = new MetaInfo(); meta.setCreateId(context.getPrincipalId()); meta.setCreateTime(new Date()); meta.setUpdateId(context.getPrincipalId()); meta.setUpdateTime(meta.getCreateTime()); meta.setVersionInd("0"); return meta; } private StatusInfo newStatus() { StatusInfo status = new StatusInfo(); status.setSuccess(Boolean.TRUE); return status; } private MetaInfo updateMeta(MetaInfo old, ContextInfo context) { MetaInfo meta = new MetaInfo(old); meta.setUpdateId(context.getPrincipalId()); meta.setUpdateTime(new Date()); meta.setVersionInd((Integer.parseInt(meta.getVersionInd()) + 1) + ""); return meta; } @Override public StatusInfo addProcessToProcessCategory(String processKey, String processCategoryId, ContextInfo contextInfo) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { ]]> 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 + "]"; ]]> 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; } } ]]> 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; } } ]]> keyDateInfoList = getAcademicCalendarService().getKeyDatesForTerm(termKey, context); for (KeyDateInfo keyDateInfo : keyDateInfoList){ if(AtpServiceConstants.MILESTONE_INSTRUCTIONAL_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setClassesMeetDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_REGISTRATION_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setRegistrationPeriod(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_DROP_DATE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setDropPeriodEndsDate(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_FINAL_EXAM_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setFinalExaminationsDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_GRADES_DUE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setGradesDueDate(keyDateInfo); } } ]]> reqComponents, StatementOperator operator, Map reqComponentPropositionMap) throws InvalidParameterException { ReqComponentInfo req1 = null, req2 = null; if (reqComponents == null || reqComponents.isEmpty() || reqComponents.size() > 2) { throw new InvalidParameterException("reqComponents parameter is invalid"); } req1 = reqComponents.get(0); Proposition prop1 = buildPropositionForRequirementComponent(req1); reqComponentPropositionMap.put(prop1, req1); Proposition prop2 = null; if (reqComponents.size() == 2) { req2 = reqComponents.get(1); prop2 = buildPropositionForRequirementComponent(req2); reqComponentPropositionMap.put(prop2, req2); } if (prop2 == null) { return prop1; } else { LogicalOperator logicalOperator = translateOperator(operator); return new CompoundProposition(logicalOperator, Arrays.asList(prop1, prop2)); } } private LogicalOperator translateOperator(StatementOperator statementOperator) throws InvalidParameterException { ]]> 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() { ]]> keyDateInfoList = getAcademicCalendarService().getKeyDatesForTerm(term.getId(), context); for (KeyDateInfo keyDateInfo : keyDateInfoList){ if(AtpServiceConstants.MILESTONE_INSTRUCTIONAL_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setClassesMeetDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_REGISTRATION_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setRegistrationPeriod(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_DROP_DATE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setDropPeriodEndsDate(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_FINAL_EXAM_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setFinalExaminationsDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_GRADES_DUE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setGradesDueDate(keyDateInfo); } } termWrapperList.add(termWrapper); } academicCalendarWrapper.setTermWrapperList(termWrapperList); ]]> values = new ArrayList(); for(SearchParameterValue value : entity.getValues()) { values.add(value.getValue()); } dto.setValue(values); if(entity.getValues().size() == 1) { dto.setValue(entity.getValues().get(0).getValue()); } return dto; } public static MembershipQuery toMembershipQueryEntity(MembershipQueryInfo dto) { if(dto == null) { return null; } MembershipQuery entity = new MembershipQuery(); entity.setSearchTypeKey(dto.getSearchTypeKey()); List list = new ArrayList(); for(SearchParam param : dto.getQueryParamValueList()) { ]]> 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 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; } } ]]> cluSetIds = new ArrayList(entity.getCluSets() .size()); for (CluSet id : entity.getCluSets()) { cluSetIds.add(id.getId()); } dto.setCluSetIds(cluSetIds); } List cluIds = new ArrayList(entity.getCluVerIndIds().size()); for (CluSetJoinVersionIndClu join : entity.getCluVerIndIds()) { cluIds.add(join.getCluVersionIndId()); } dto.setCluIds(cluIds); dto.setAttributes(toAttributeMap(entity.getAttributes())); dto.setMetaInfo(toMetaInfo(entity.getMeta(), entity.getVersionNumber())); ]]> 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 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; } ]]> 0 || cluSetInfo.getCluSetIds().size() > 0)) { throw new UnsupportedActionException("Dynamic CluSet cannot contain Clus and/or CluSets. CluSet id="+cluSetInfo.getId()); } else if (cluSetInfo.getCluIds().size() > 0 && cluSetInfo.getCluSetIds().size() > 0) { throw new UnsupportedActionException("CluSet cannot contain both Clus and CluSets. CluSet id="+cluSetInfo.getId()); } } @Override @Transactional(readOnly=false) public CluSetInfo updateCluSet(String cluSetId, CluSetInfo cluSetInfo) ]]> validations = validateOrg("", "", orgInfo, contextInfo); for (ValidationResultInfo validationResult : validations) { if (validationResult.isError()) throw new DataValidationErrorException(validationResult.toString()); } } catch (DoesNotExistException e1) { logger.error("Exception occured: ", e1); } Org org = null; // Create a new persistence entity from the orgInfo try { org = OrganizationAssembler.toOrg(false, orgInfo, organizationDao); } catch (DoesNotExistException e) { // // OrgAssembler should not be throwing this exception for create! logger.info(e.getMessage(), e); throw new OperationFailedException(e.getMessage(), e); } catch (VersionMismatchException e) { // // OrgAssembler should not be throwing this exception for create! logger.info(e.getMessage(), e); throw new OperationFailedException(e.getMessage(), e); } // Persist the org organizationDao.create(org); // Copy back to an orgInfo and return OrgInfo createdOrgInfo = OrganizationAssembler.toOrgInfo(org); return createdOrgInfo; } @Override ]]> 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; } ]]> 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, ]]> toResultComponentTypeInfo( ]]> 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) { PermissionEnum perm = PermissionEnum.kimValueOf(fieldAccessLevel); if (PermissionEnum.EDIT.equals(perm)) { setReadOnly(fieldMetadata, false); } else if (PermissionEnum.PARTIAL_UNMASK.equals(perm)){ ]]> ()); } cluFee.getCluFeeRecords().add(feeRec); } ]]> ()); } cluFee.getCluFeeRecords().add(feeRec); } ]]> fieldMap = buildFieldMap(requirementComponent.getReqCompFields()); Proposition result = null; if (requirementComponent.getTypeKey().equals(StatementServiceConstants.ENROLLED_COURSE_REQ_COM_TYPE)) { ]]> getHolidayCalendarsByStartYear(Integer year, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { // TODO sambit - THIS METHOD NEEDS JAVADOCS //return null; final Date yearBegin, yearEnd; Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(year, 0, 1); yearBegin = cal.getTime(); // XXXX-01-01 00:00:00.000 cal.add(Calendar.YEAR, 1); cal.add(Calendar.MILLISECOND, -1); yearEnd = cal.getTime(); // XXXX-12-31 23:59:59.999 Set atpInfos = new TreeSet(new Comparator() { @Override public int compare(AtpInfo atpInfo1, AtpInfo atpInfo2) { return atpInfo1.getId().compareTo(atpInfo2.getId()); } }); atpInfos.addAll(atpService.getAtpsByStartDateRangeAndType(yearBegin, yearEnd, AtpServiceConstants.ATP_HOLIDAY_CALENDAR_TYPE_KEY, contextInfo)); ]]> fieldMap = buildFieldMap(requirementComponent.getReqCompFields()); Proposition result = null; if (requirementComponent.getTypeKey().equals(StatementServiceConstants.COMPLETED_COURSE_REQ_COM_TYPE)) { ]]> keyDateInfoList = getAcademicCalendarService().getKeyDatesForTerm(termKey, context); for (KeyDateInfo keyDateInfo : keyDateInfoList){ if(AtpServiceConstants.MILESTONE_INSTRUCTIONAL_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setClassesMeetDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_REGISTRATION_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setRegistrationPeriod(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_DROP_DATE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setDropPeriodEndsDate(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_FINAL_EXAM_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setFinalExaminationsDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_GRADES_DUE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setGradesDueDate(keyDateInfo); } } termWrapperList.add(termWrapper); ]]> () { @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) { ]]> subProps = new ArrayList(statementTreeView.getStatements().size()); for (StatementTreeViewInfo subStatement : statementTreeView.getStatements()) { Proposition proposition = buildPropositionFromComponents(subStatement, reqComponentPropositionMap); subProps.add(buildPropositionFromComponents(subStatement, reqComponentPropositionMap)); } CompoundProposition compoundProposition = new CompoundProposition(translateOperator(statementTreeView.getOperator()), subProps); return compoundProposition; } return null; } private Proposition translateReqComponents(List reqComponents, StatementOperator operator, Map reqComponentPropositionMap) throws InvalidParameterException { ]]> 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 scale. */ public String getId() { return id; } public void setId(String id) { this.id = id; } } ]]> keyDateInfoList = getAcademicCalendarService().getKeyDatesForTerm(termKey, context); for (KeyDateInfo keyDateInfo : keyDateInfoList){ if(AtpServiceConstants.MILESTONE_INSTRUCTIONAL_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setClassesMeetDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_REGISTRATION_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setRegistrationPeriod(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_DROP_DATE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setDropPeriodEndsDate(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_FINAL_EXAM_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setFinalExaminationsDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_GRADES_DUE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setGradesDueDate(keyDateInfo); } } ]]> 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() { ]]> keyDateInfoList = getAcademicCalendarService().getKeyDatesForTerm(termKey, new ContextInfo()); for (KeyDateInfo keyDateInfo : keyDateInfoList){ if(AtpServiceConstants.MILESTONE_INSTRUCTIONAL_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setClassesMeetDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_REGISTRATION_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setRegistrationPeriod(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_DROP_DATE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setDropPeriodEndsDate(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_FINAL_EXAM_PERIOD_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setFinalExaminationsDates(keyDateInfo); } else if(AtpServiceConstants.MILESTONE_GRADES_DUE_TYPE_KEY.equals(keyDateInfo.getTypeKey())){ termWrapper.setGradesDueDate(keyDateInfo); } } ]]> i = cluSet.getCluSets().iterator(); i.hasNext();) { CluSet childCluSet = i.next(); if (childCluSet.getId().equals(removedCluSetId)) { i.remove(); luDao.update(cluSet); StatusInfo statusInfo = new StatusInfo(); statusInfo.setSuccess(true); return statusInfo; } } } StatusInfo statusInfo = new StatusInfo(); statusInfo.setSuccess(false); statusInfo.setMessage("CluSet does not contain CluSet:" + removedCluSetId); return statusInfo; } @Override @Transactional(readOnly=false) public StatusInfo addCluToCluSet(String cluId, String cluSetId) ]]> 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; } } ]]> ()); // Loop through all the credit options in this clu for (String optionType : options) { if(currentResults.containsKey(optionType)){ //If the option exists already copy it to the new list of result options ResultOptionInfo resultOptionInfo = currentResults.get(optionType); cluResult.getResultOptions().add(resultOptionInfo); }else{ //Otherwise create a new result option ResultOptionInfo resultOptionInfo = new ResultOptionInfo(); RichTextInfo desc = new RichTextInfo(); desc.setPlain(resultDescription); resultOptionInfo.setDesc(desc); resultOptionInfo.setResultComponentId(optionType); resultOptionInfo.setState(cluState); ]]> object of all the currently persisted objects in the // list Map oldResultOptionMap = new HashMap(); for (ResultOption opt : result.getResultOptions()) { oldResultOptionMap.put(opt.getId(), opt); } result.getResultOptions().clear(); // Loop through the new list, if the item exists already update and // remove from the list otherwise create a new entry for (ResultOptionInfo resOptInfo : cluResultInfo.getResultOptions()) { ResultOption opt = oldResultOptionMap.remove(resOptInfo.getId()); if (opt == null) { // New result option opt = new ResultOption(); // Copy properties BeanUtils.copyProperties(resOptInfo, opt, new String[] { "resultUsageType", "desc" }); } else { ]]> ((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 { ]]> 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() { ]]> toCluLoRelationInfos( List entities) { List dtos = new ArrayList( entities.size()); if (entities != null) { for (CluLoRelation entity : entities) { dtos.add(toCluLoRelationInfo(entity)); } } return dtos; } public static CluLoRelationInfo toCluLoRelationInfo(CluLoRelation entity) { if (entity == null) { return null; } CluLoRelationInfo dto = new CluLoRelationInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "cluId", "attributes", "metaInfo", "type" }); ]]> clus = new ArrayList(); for (String cluId : cluSetInfo.getCluIds()) { if(cluId!=null){ //Optimized version of clu translation. It seems like for now we only need the following information. //If more information is needed, then appropriate method in assembler has to be used. Clu clu = luDao.getCurrentCluVersion(cluId); CluInfo cluInfo = new CluInfo(); cluInfo.setId(clu.getId()); cluInfo.setType(clu.getLuType().getId()); cluInfo.setOfficialIdentifier(LuServiceAssembler.toCluIdentifierInfo(clu.getOfficialIdentifier())); clus.add(cluInfo); } } cluSetTreeViewInfo.setClus(clus); } @Override public List getCluSetInfoByIdList(List cluSetIdList) ]]> 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() { ]]> 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); ]]> keyDates = academicCalendarService.getKeyDatesForTerm(term.getId(), null); if(keyDates != null){ //Get the valid period types List milestoneTypeRelations = getTypeService().getTypeTypeRelationsByOwnerAndType("kuali.milestone.type.group.appt.regperiods","kuali.type.type.relation.type.group",new ContextInfo()); List validMilestoneTypes = new ArrayList(); for(TypeTypeRelationInfo milestoneTypeRelation:milestoneTypeRelations){ validMilestoneTypes.add(milestoneTypeRelation.getRelatedTypeKey()); } //Add in only valid milestones that are registration periods List periodMilestones = new ArrayList(); for(KeyDateInfo keyDate:keyDates){ if(validMilestoneTypes.contains(keyDate.getTypeKey())){ periodMilestones.add(keyDate); } } ]]> 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; } } ]]> > excludedViews = new ArrayList>(); excludedViews.add(ProgramSections.PROGRAM_REQUIREMENTS_EDIT); excludedViews.add(ProgramSections.SUPPORTING_DOCUMENTS_EDIT); excludedViews.add(ProgramSections.SUMMARY); addCommonButton(ProgramProperties.get().program_menu_sections(), saveButton, excludedViews); addCommonButton(ProgramProperties.get().program_menu_sections(), cancelButton, excludedViews); initialized = true; } } private void initHandlers() { ]]> 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 + "]"; ]]> permissionDetails = new LinkedHashMap(); Map roleQuals = new LinkedHashMap(); roleQuals.put(StudentIdentityConstants.DOCUMENT_NUMBER,docId); return Boolean.valueOf(getPermissionService().isAuthorizedByTemplate(SecurityUtils.getCurrentUserId(), PermissionType.ADD_ADHOC_REVIEWER.getPermissionNamespace(), PermissionType.ADD_ADHOC_REVIEWER.getPermissionTemplateName(), permissionDetails, roleQuals)); } return Boolean.FALSE; } public Boolean isAuthorizedRemoveReviewers(String docId) throws OperationFailedException { ]]> 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; } } ]]> getKeyValues(ViewModel model) { List keyValues = new ArrayList(); RegistrationWindowsManagementForm form = (RegistrationWindowsManagementForm)model; ContextInfo context = TestHelper.getContext1(); try { TermInfo term = form.getTermInfo(); if (term.getId() != null && !term.getId().isEmpty()) { List keyDateInfoList = getAcalService().getKeyDatesForTerm(term.getId(), context); ]]> " + ProgramProperties.get().programInformation_activateInstructions() + "

"); configurer.addField(section, ProgramConstants.PREV_END_PROGRAM_ENTRY_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_entryTerm())); configurer.addField(section, ProgramConstants.PREV_END_PROGRAM_ENROLL_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_enrollTerm())); return section; } } ]]>
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"), "Major Disicpline Version"); ]]> toCluCluRelationInfos( List entities) { List dtos = new ArrayList( entities.size()); if (entities != null) { for (CluCluRelation entity : entities) { dtos.add(toCluCluRelationInfo(entity)); } } return dtos; } public static CluCluRelationInfo toCluCluRelationInfo(CluCluRelation entity) { if (entity == null) { return null; } CluCluRelationInfo dto = new CluCluRelationInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "cluId", "relatedCluId", "cluRelationRequired", "attributes", "metaInfo" }); ]]> getDivisionsDeployment() ; public void setDivisionsDeployment(List divisionsDeployment) ; public List getDivisionsFinancialResources() ; public void setDivisionsFinancialResources(List divisionsFinancialResources); public List getDivisionsFinancialControl() ; public void setDivisionsFinancialControl(List divisionsFinancialControl) ; public List getUnitsDeployment() ; public void setUnitsDeployment(List unitsDeployment); public List getUnitsFinancialResources() ; public void setUnitsFinancialResources(List unitsFinancialResources); public List getUnitsFinancialControl() ; public void setUnitsFinancialControl(List unitsFinancialControl); } ]]> 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; } ]]> 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"); ]]> results = new ArrayList(relations.size()); for (TypeTypeRelationInfo rel : relations) { try { results.add(typeService.getType(rel.getRelatedTypeKey(), contextInfo)); } catch (DoesNotExistException e) { throw new OperationFailedException(e.getMessage(), e); } } return results; } return null; } @Override public List getHolidayTypesForHolidayCalendarType(String holidayCalendarTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, ]]> 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() { ]]> foInfos = coService.getFormatOfferingsByCourseOffering(coId, new ContextInfo()); for (FormatOfferingInfo foInfo: foInfos) { String foId = foInfo.getId(); // Delete activity offerings List aoInfos = coService.getActivityOfferingsByFormatOffering(foId, new ContextInfo()); for (ActivityOfferingInfo aoInfo: aoInfos) { coService.deleteActivityOffering(aoInfo.getId(), new ContextInfo()); } // Delete format offerings first coService.deleteFormatOffering(foInfo.getId(), new ContextInfo()); } coService.deleteCourseOffering(coId, new ContextInfo()); } } ]]> 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, ]]> 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; } ]]> 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(); } } }); } } }); ]]> callback) { //FIXME notify current controller of the page change so it can perform an action //FIXME before navigation event callback.exec(true); } } public ApplicationHeader(){ ]]> 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() { ]]> getSortOrderTypeKeys() { if (this.sortOrderTypeKeys == null) { this.sortOrderTypeKeys = new ArrayList(); } return this.sortOrderTypeKeys; } public void setSortOrderTypeKeys(List sortOrderTypeKeys) { this.sortOrderTypeKeys = sortOrderTypeKeys; } @Override public Boolean getVariesByTime() { return this.variesByTime; } public void setVariesByTime(Boolean variesByTime) { this.variesByTime = variesByTime; } @Override public Boolean getSupportsGetMembers() { return supportsGetMembers; } public void setSupportsGetMembers(Boolean supportsGetMembers) { this.supportsGetMembers = supportsGetMembers; } } ]]> 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(){ ]]> { private boolean isEmpty(String value){ return value == null || (value != null && "".equals(value)); ]]> 0) { for(SearchResultRow srrow : searchResult.getRows()){ List srCells = srrow.getCells(); if(srCells != null && srCells.size() > 0){ for(SearchResultCell srcell : srCells){ if (srcell.getKey().equals("lu.resultColumn.cluId")) { ]]> toLuiInfos(List entities) { List dtos = new ArrayList(entities.size()); if (entities != null) { for (Lui entity : entities) { dtos.add(toLuiInfo(entity)); } } return dtos; } public static LuiInfo toLuiInfo(Lui entity) { if (entity == null) { return null; } LuiInfo luiInfo = new LuiInfo(); BeanUtils.copyProperties(entity, luiInfo, new String[] { "clu", ]]> 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() { ]]> >() { @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() { ]]> >() { @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 )"); ]]> toOrgOrgRelationInfos(List orgOrgRelations) { List orgOrgRelationInfo = new ArrayList(); for(OrgOrgRelation orgOrgRelation:orgOrgRelations){ orgOrgRelationInfo.add(toOrgOrgRelationInfo(orgOrgRelation)); } return orgOrgRelationInfo; } public static OrgOrgRelationInfo toOrgOrgRelationInfo(OrgOrgRelation orgOrgRelation) { if (orgOrgRelation == null) { return null; } OrgOrgRelationInfo orgOrgRelationInfo = new OrgOrgRelationInfo(); BeanUtils.copyProperties(orgOrgRelation, orgOrgRelationInfo, new String[] { "type", "attributes", ]]> viewEnum, String name, String modelId) { super(viewEnum, name, modelId); this.parentController = parentController; } @Override public void beforeShow(final Callback onReadyCallback) { retrieveAndSetupReqCompTypes(); //TODO cache it for each statement type? if (!isInitialized) { setupHandlers(); draw(); isInitialized = true; } onReadyCallback.exec(true); } private void setupHandlers() { editReqCompWidget.setReqCompConfirmButtonClickCallback(actionButtonClickedReqCompCallback); editReqCompWidget.setNewReqCompSelectedCallbackCallback(newReqCompSelectedCallbackCallback); editReqCompWidget.setRetrieveCompositionTemplateCallback(retrieveCompositionTemplateCallback); editReqCompWidget.setRetrieveFieldsMetadataCallback(retrieveFieldsMetadataCallback); editReqCompWidget.setRetrieveCustomWidgetCallback(retrieveCustomWidgetCallback); ]]> (){ public void onSuccess(Boolean isLatest) { actionBox.setList(ActionType.getValues(isLatest)); } }); } else { actionBox.setList(ActionType.getValues(false)); } } ]]> " + ProgramProperties.get().programInformation_activateInstructions() + "

"); configurer.addField(section, ProgramConstants.PREV_END_PROGRAM_ENTRY_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_entryTerm())); configurer.addField(section, ProgramConstants.PREV_END_PROGRAM_ENROLL_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_enrollTerm())); return section; } } ]]>
list = new ArrayList(); ]]> && ((List) param).size() == 0) { throw new MissingParameterException(paramName + " can not be an empty list"); } } @Override @Transactional(readOnly=false) public StatusInfo addCluSetsToCluSet(String cluSetId, List cluSetIdList) ]]> i = cluSet.getCluVerIndIds().iterator(); i.hasNext();) { CluSetJoinVersionIndClu join = i.next(); if (join.getCluVersionIndId().equals(cluId)) { i.remove(); luDao.delete(join); luDao.update(cluSet); StatusInfo statusInfo = new StatusInfo(); statusInfo.setSuccess(true); return statusInfo; } } StatusInfo statusInfo = new StatusInfo(); statusInfo.setSuccess(false); statusInfo.setMessage("Clu set does not contain Clu:" + cluId); return statusInfo; } ]]> 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){ ]]> 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() { ]]> getFeeAmounts() { if (feeAmounts == null) { feeAmounts = new ArrayList(0); } return feeAmounts; } public void setFeeAmounts(List feeAmounts) { this.feeAmounts = feeAmounts; } ]]> toOrgInfos(List orgs) { List orgInfos = new ArrayList(orgs.size()); for (Org org : orgs) { orgInfos.add(toOrgInfo(org)); } return orgInfos; } public static OrgInfo toOrgInfo(Org org) { if (org == null) { return null; } OrgInfo orgInfo = new OrgInfo(); BeanUtils.copyProperties(org, orgInfo, new String[] { "type", "attributes", ]]> 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; } } ]]> ()); } cluSet.getCluSets().add(c); } cluSet.setMembershipQuery(toMembershipQueryEntity(cluSetInfo.getMembershipQuery())); return cluSet; } public static CluSetInfo toCluSetInfo(CluSet entity) { if (entity == null) { return null; } CluSetInfo dto = new CluSetInfo(); BeanUtils.copyProperties(entity, dto, new String[] { "descr", "cluCriteria", "cluSets", "clus", "attributes", "metaInfo", "membershipQuery" }); ]]> toBeDroppedLPRs; try { toBeDroppedLPRs = getLprsByLuiPersonAndState(lprTransactionItemInfo.getPersonId(), lprTransactionItemInfo.getExistingLuiId(), LuiPersonRelationServiceConstants.REGISTERED_STATE_KEY, context); } catch (DisabledIdentifierException ex) { throw new OperationFailedException("unexpected", ex); } if (toBeDroppedLPRs.size() > 1) { throw new OperationFailedException("Multiple LuiPersonRelations between person:" + lprTransactionItemInfo.getPersonId() + " and lui:" + lprTransactionItemInfo.getExistingLuiId() + "; unimplemented functionality required to deal with this scenario is currentluy unimplemented"); } for (LuiPersonRelationInfo lprInfo : toBeDroppedLPRs) { // TODO - change state to LuiPersonRelationServiceConstants.DROPPED_STATE_KEY, rather than deleting /* * do this instead of delete lprInfo.setStateKey(LuiPersonRelationServiceConstants.DROPPED_STATE_KEY); * try { updateLpr(lprInfo.getId(), lprInfo, context); } catch (ReadOnlyException e) { throw new * OperationFailedException("updateLpr() failure in processLprTransaction()", e); } */ deleteLpr(lprInfo.getId(), context); ]]> 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() { ]]>