private void removeIdPDescriptor(EntitiesDescriptorType entities) { for (Object descriptorType : new ArrayList<Object>(entities.getEntityDescriptor())) { for (EntityDescriptorType.EDTChoiceType choiceType : ((EntityDescriptorType) descriptorType).getChoiceType()) { for (EntityDescriptorType.EDTDescriptorChoiceType descriptorChoiceType : choiceType.getDescriptors()) { if (descriptorChoiceType.getIdpDescriptor() != null) { entities.removeEntityDescriptor(descriptorType); } } } } }
private void updateKeyDescriptor(EntityDescriptorType entityD, KeyDescriptorType keyD) { List<EDTDescriptorChoiceType> objs = entityD.getChoiceType().get(0).getDescriptors(); if (objs != null) { for (EDTDescriptorChoiceType roleD : objs) { RoleDescriptorType roleDescriptor = roleD.getRoleDescriptor(); roleDescriptor.addKeyDescriptor(keyD); } } } }
/** * Get the SP Descriptor from an entity descriptor * * @param entityDescriptor * @return */ public static SPSSODescriptorType getSPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { SPSSODescriptorType spSSO = edtDesc.getSpDescriptor(); if (spSSO != null) { return spSSO; } } } return null; }
/** * Get the IDP metadata descriptor from an entity descriptor * * @param entityDescriptor * * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
/** * Create an Entity Descriptor * @param idpOrSPDescriptor a descriptor for either the IDP or SSO * @return */ public static EntityDescriptorType createEntityDescriptor(SSODescriptorType idpOrSPDescriptor) { EDTDescriptorChoiceType edtDescriptorChoiceType = new EDTDescriptorChoiceType(idpOrSPDescriptor); List<EDTDescriptorChoiceType> edtList = new ArrayList<EntityDescriptorType.EDTDescriptorChoiceType>(); edtList.add(edtDescriptorChoiceType); EDTChoiceType choiceType = new EDTChoiceType(edtList); EntityDescriptorType entity = new EntityDescriptorType(" "); entity.addChoiceType(choiceType); return entity; }
private void updateKeyDescriptors(EntitiesDescriptorType entityId, KeyDescriptorType keyD){ List<Object> entities = entityId.getEntityDescriptor(); for (Object obj : entities){ updateKeyDescriptor((EntityDescriptorType) obj,keyD); } }
private ExtensionsType parseExtensions(XMLEventReader xmlEventReader) throws ParsingException { ExtensionsType extensions = new ExtensionsType(); Element extElement = StaxParserUtil.getDOMElement(xmlEventReader); extensions.setElement(extElement); return extensions; } }
private void updateKeyDescriptor(EntityDescriptorType entityD, KeyDescriptorType keyD) { List<EDTDescriptorChoiceType> objs = entityD.getChoiceType().get(0).getDescriptors(); if (objs != null) { for (EDTDescriptorChoiceType roleD : objs) { RoleDescriptorType roleDescriptor = roleD.getRoleDescriptor(); roleDescriptor.addKeyDescriptor(keyD); } } } }
private void removeIdPDescriptor(EntitiesDescriptorType entities) { for (Object descriptorType : new ArrayList<Object>(entities.getEntityDescriptor())) { for (EntityDescriptorType.EDTChoiceType choiceType : ((EntityDescriptorType) descriptorType).getChoiceType()) { for (EntityDescriptorType.EDTDescriptorChoiceType descriptorChoiceType : choiceType.getDescriptors()) { if (descriptorChoiceType.getIdpDescriptor() != null) { entities.removeEntityDescriptor(descriptorType); } } } } }
/** * Get the SP Descriptor from an entity descriptor * * @param entityDescriptor * * @return */ public static SPSSODescriptorType getSPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { SPSSODescriptorType spSSO = edtDesc.getSpDescriptor(); if (spSSO != null) { return spSSO; } } } return null; }
/** * Get the IDP metadata descriptor from an entity descriptor * * @param entityDescriptor * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
/** * Create an Entity Descriptor * * @param idpOrSPDescriptor a descriptor for either the IDP or SSO * @return */ public static EntityDescriptorType createEntityDescriptor(SSODescriptorType idpOrSPDescriptor) { EDTDescriptorChoiceType edtDescriptorChoiceType = new EDTDescriptorChoiceType(idpOrSPDescriptor); List<EDTDescriptorChoiceType> edtList = new ArrayList<EntityDescriptorType.EDTDescriptorChoiceType>(); edtList.add(edtDescriptorChoiceType); EDTChoiceType choiceType = new EDTChoiceType(edtList); EntityDescriptorType entity = new EntityDescriptorType(" "); entity.addChoiceType(choiceType); return entity; }
private void updateKeyDescriptor(EntityDescriptorType entityD, KeyDescriptorType keyD) { List<EDTDescriptorChoiceType> objs = entityD.getChoiceType().get(0).getDescriptors(); if (objs != null) { for (EDTDescriptorChoiceType roleD : objs) { RoleDescriptorType roleDescriptor = roleD.getRoleDescriptor(); roleDescriptor.addKeyDescriptor(keyD); } } } }
/** * Get the SP Descriptor from an entity descriptor * @param entityDescriptor * @return */ public static SPSSODescriptorType getSPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { SPSSODescriptorType spSSO = edtDesc.getSpDescriptor(); if (spSSO != null) { return spSSO; } } } return null; }
/** * Get the IDP metadata descriptor from an entity descriptor * * @param entityDescriptor * * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
/** * Create an Entity Descriptor * @param idpOrSPDescriptor a descriptor for either the IDP or SSO * @return */ public static EntityDescriptorType createEntityDescriptor(SSODescriptorType idpOrSPDescriptor) { EDTDescriptorChoiceType edtDescriptorChoiceType = new EDTDescriptorChoiceType(idpOrSPDescriptor); List<EDTDescriptorChoiceType> edtList = new ArrayList<EntityDescriptorType.EDTDescriptorChoiceType>(); edtList.add(edtDescriptorChoiceType); EDTChoiceType choiceType = new EDTChoiceType(edtList); EntityDescriptorType entity = new EntityDescriptorType(" "); entity.addChoiceType(choiceType); return entity; }
private void updateKeyDescriptor(EntityDescriptorType entityD, KeyDescriptorType keyD) { List<EDTDescriptorChoiceType> objs = entityD.getChoiceType().get(0).getDescriptors(); if (objs != null) { for (EDTDescriptorChoiceType roleD : objs) { RoleDescriptorType roleDescriptor = roleD.getRoleDescriptor(); roleDescriptor.addKeyDescriptor(keyD); } } } }
/** * Get the SP Descriptor from an entity descriptor * * @param entityDescriptor * * @return */ public static SPSSODescriptorType getSPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { SPSSODescriptorType spSSO = edtDesc.getSpDescriptor(); if (spSSO != null) { return spSSO; } } } return null; }
/** * Get the IDP metadata descriptor from an entity descriptor * @param entityDescriptor * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
private void updateKeyDescriptor(EntityDescriptorType entityD, KeyDescriptorType keyD) { List<EDTDescriptorChoiceType> objs = entityD.getChoiceType().get(0).getDescriptors(); if (objs != null) { for (EDTDescriptorChoiceType roleD : objs) { RoleDescriptorType roleDescriptor = roleD.getRoleDescriptor(); roleDescriptor.addKeyDescriptor(keyD); } } } }