private Element createIDPEntityDescriptor(boolean exportPrivateData) throws Exception {
  Element entEle=doc.createElementNS(null,SAMLNames.ENTDESCRIPTOR);
  String id=idmClient.getEntityID(tenantName);
  String alias=idmClient.getLocalIDPAlias(tenantName);
  if (id == null) {
    id=tenantName;
  }
  entEle.setAttribute(SAMLNames.ENTID,id);
  Element idpSSO=createIDPSSODescriptor(exportPrivateData);
  entEle.appendChild(idpSSO);
  if (exportPrivateData) {
    if (alias == null || alias.isEmpty()) {
      alias=id;
    }
    Element orgEle=createOrganization(tenantName,tenantName,alias,SAMLNames.ENGLISH);
    entEle.appendChild(orgEle);
  }
  return entEle;
}

private Element createIDPEntityDescriptor ( boolean exportPrivateData ) throws Exception { Element entEle = doc . createElementNS ( null , SAMLNames . ENTDESCRIPTOR ) ; String id = idmClient . getEntityID ( tenantName ) ; String alias = idmClient . getLocalIDPAlias ( tenantName ) ; if ( id == null ) { id = tenantName ; } entEle . setAttribute ( SAMLNames . ENTID , id ) ; Element idpSSO = createIDPSSODescriptor ( exportPrivateData ) ; entEle . appendChild ( idpSSO ) ; if ( exportPrivateData ) { if ( alias == null || alias . isEmpty ( ) ) { alias = id ; } Element orgEle = createOrganization ( tenantName , tenantName , alias , SAMLNames . ENGLISH ) ; entEle . appendChild ( orgEle ) ; } return entEle ; }
create extension element of entitydescriptor in dom .
