/** * Login to ICW returning a session id */ public String getPASUser(Integer mosId) throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); MemberOfStaff mosDo = (MemberOfStaff)factory.getDomainObject(MemberOfStaff.class, mosId.intValue()); if (mosDo==null) throw new DomainInterfaceException("User has no PAS mapping. Please add external mapping for PAS in User Administration."); MemberOfStaffMappingsLiteVo mVo = MemberOfStaffMappingsLiteVoAssembler.create(mosDo); for (int i = 0; i < mVo.getCodeMappings().size(); i++) { TaxonomyMap element = mVo.getCodeMappings().get(i); if (element.getTaxonomyName().equals(TaxonomyType.PAS)) return element.getTaxonomyCode(); } return ""; }
public String getPASUser(Integer mosId) throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); MemberOfStaff mosDo = (MemberOfStaff)factory.getDomainObject(MemberOfStaff.class, mosId.intValue()); if (mosDo==null) throw new DomainInterfaceException("User has no PAS mapping. Please add external mapping for PAS in User Administration."); MemberOfStaffMappingsLiteVo mVo = MemberOfStaffMappingsLiteVoAssembler.create(mosDo); for (int i = 0; i < mVo.getCodeMappings().size(); i++) { TaxonomyMap element = mVo.getCodeMappings().get(i); if (element.getTaxonomyName().equals(TaxonomyType.PAS)) return element.getTaxonomyCode(); } return ""; }
public String getPasMappingFromConsultant(IMos mos) { //WDEV-9946 undo of changes if (mos == null || mos.getIMosId() == null) throw new CodingRuntimeException("mos is null or id not provided in method getPasMappingFromConsultant"); //WDEV-9946 undo of changes MemberOfStaff doMos = (MemberOfStaff) getDomainFactory().getDomainObject(MemberOfStaff.class, mos.getIMosId()); return MemberOfStaffMappingsLiteVoAssembler.create(doMos).getPasCode(); }